clarify existing/correct behavior
authorDan Vanderkam <dan@dygraphs.com>
Sat, 6 Aug 2011 18:14:20 +0000 (14:14 -0400)
committerDan Vanderkam <dan@dygraphs.com>
Sat, 6 Aug 2011 18:14:20 +0000 (14:14 -0400)
auto_tests/tests/axis_labels.js

index 98ca9b5..7d6a662 100644 (file)
@@ -178,9 +178,12 @@ AxisLabelsTestCase.prototype.testAxisLabelFormatter = function () {
   var graph = document.getElementById("graph");
   var g = new Dygraph(graph, data, opts);
 
-  // TODO(danvk): this is not correct!
+  // This is the existing behavior:
   assertEquals(['y0','y1','y2','y3','y4','y5','y6','y7','y8'], getXLabels());
 
+  // This is the correct behavior:
+  // assertEquals(['x0','x1','x2','x3','x4','x5','x6','x7','x8'], getXLabels());
+
   assertEquals(['y0','y2','y4','y6','y8','y10','y12','y14','y16','y18'], getYLabels());
 };
 
@@ -229,9 +232,12 @@ AxisLabelsTestCase.prototype.testValueFormatter = function () {
   var graph = document.getElementById("graph");
   var g = new Dygraph(graph, data, opts);
 
-  // TODO(danvk): this is not correct!
+  // This is the existing behavior:
   assertEquals(['y0','y1','y2','y3','y4','y5','y6','y7','y8'], getXLabels());
 
+  // This is the correct behavior:
+  // assertEquals(['x0','x1','x2','x3','x4','x5','x6','x7','x8'], getXLabels());
+
   assertEquals(['y0','y2','y4','y6','y8','y10','y12','y14','y16','y18'], getYLabels());
 };
 
@@ -289,8 +295,11 @@ AxisLabelsTestCase.prototype.testAxisLabelFormatterPrecedence = function () {
   var graph = document.getElementById("graph");
   var g = new Dygraph(graph, data, opts);
 
-  // TODO(danvk): this is not correct!
+  // This is the existing behavior:
   assertEquals(['y0','y1','y2','y3','y4','y5','y6','y7','y8'], getXLabels());
 
+  // This is the correct behavior:
+  // assertEquals(['x0','x1','x2','x3','x4','x5','x6','x7','x8'], getXLabels());
+
   assertEquals(['y0','y2','y4','y6','y8','y10','y12','y14','y16','y18'], getYLabels());
 };