From c3b3ea32cbd608f15df6cd61aaa848e28ca0adb2 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Fri, 27 Sep 2013 10:30:58 -0400 Subject: [PATCH] Code comments and indentation fixes. --- auto_tests/tests/CanvasAssertions.js | 3 +++ auto_tests/tests/connect_separated_points.js | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/auto_tests/tests/CanvasAssertions.js b/auto_tests/tests/CanvasAssertions.js index 62a3f49..9550912 100644 --- a/auto_tests/tests/CanvasAssertions.js +++ b/auto_tests/tests/CanvasAssertions.js @@ -185,6 +185,9 @@ CanvasAssertions.numLinesDrawn = function(proxy, color) { var num_lines = 0; for (var i = 0; i < proxy.calls__.length; i++) { var call = proxy.calls__[i]; + + // note: Don't simplify these two conditionals into one. The + // separation simplifies debugging tricky tests. if (call.name == "lineTo") { if (call.properties.strokeStyle == color) { num_lines++; diff --git a/auto_tests/tests/connect_separated_points.js b/auto_tests/tests/connect_separated_points.js index f668ebc..95ef88e 100644 --- a/auto_tests/tests/connect_separated_points.js +++ b/auto_tests/tests/connect_separated_points.js @@ -363,20 +363,20 @@ ConnectSeparatedPointsTestCase.prototype.testConnectSeparatedPointsPerSeries = f } var g = new Dygraph(document.getElementById("graph"), - [ - [1, 10, 10, 10], - [2, 15, 11, 12], - [3, null, null, 12], - [4, 20, 14, null], - [5, 15, null, 17], - [6, 18, null, null], - [7, 12, 14, null] - ], - { - labels: ["Date","Series1","Series2","Series3"], - connectSeparatedPoints: false, - colors: ["#ff0000", "#00ff00", "#0000ff"] - }); + [ + [1, 10, 10, 10], + [2, 15, 11, 12], + [3, null, null, 12], + [4, 20, 14, null], + [5, 15, null, 17], + [6, 18, null, null], + [7, 12, 14, null] + ], + { + labels: ["Date","Series1","Series2","Series3"], + connectSeparatedPoints: false, + colors: ["#ff0000", "#00ff00", "#0000ff"] + }); htx = g.hidden_ctx_; assertExpectedLinesDrawnPerSeries(htx, 4, 1, 2); -- 2.7.4