X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fsanity.js;h=44e860cc85572980ab8abf34602ed1cfb05a4151;hb=0987402460d9d364626087efc266dc665f098caa;hp=2468c832502246769be773a3fdd3ebc74f2a124b;hpb=644eff8b76ca1a39ac2841d4f76a46a32042f071;p=dygraphs.git diff --git a/auto_tests/tests/sanity.js b/auto_tests/tests/sanity.js index 2468c83..44e860c 100644 --- a/auto_tests/tests/sanity.js +++ b/auto_tests/tests/sanity.js @@ -1,4 +1,4 @@ -// Copyright (c) 2011 Google, Inc. +// Copyright (c) 2011 Google, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,8 +24,8 @@ * * @author konigsberg@google.com (Robert Konigsberg) */ -var DEAD_SIMPLE_DATA = [[ 20061010, 2100 ]]; -var ZERO_TO_FIFTY = [[ 20061010, 0 ] , [ 20061011, 50 ]]; +var DEAD_SIMPLE_DATA = [[ 10, 2100 ]]; +var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]]; var SanityTestCase = TestCase("dygraphs-sanity"); @@ -48,6 +48,9 @@ SanityTestCase.prototype.testGraphExists = function() { assertNotNull(graph); }; +// TODO(konigsberg): Move the following tests to a new package that +// tests all kinds of toDomCoords, toDataCoords, toPercent, et cetera. + /** * A sanity test of sorts, by ensuring the dygraph is created, and * isn't just some piece of junk object. @@ -79,19 +82,6 @@ SanityTestCase.prototype.testYAxisRange_custom = function() { assertEquals([0, 50], g.yAxisRange(0)); }; -function assertEqualsDelta(msg, expected, actual, delta) { - var args = this.argsWithOptionalMsg_(arguments, 4); - - var message = args[0]; - var exp = args[1]; - var act = args[2]; - var d = args[3]; - if (Math.abs(exp - act) > d) { - fail(message + - " Expected to be within " + d + " of " + exp + ", got " + act); - } -} - /** * Test that valueRange matches the y-axis range specifically. *