From c20eabd3c06287d70316ab453428bb566903d651 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Wed, 13 Jun 2012 10:29:11 -0400 Subject: [PATCH] Add test case which confirms regression reported in https://issuenav.googleplex.com/issues/dygraphs/336 --- auto_tests/tests/simple_drawing.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/auto_tests/tests/simple_drawing.js b/auto_tests/tests/simple_drawing.js index 8f3b0c5..3955a31 100644 --- a/auto_tests/tests/simple_drawing.js +++ b/auto_tests/tests/simple_drawing.js @@ -49,7 +49,7 @@ SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() { var graph = document.getElementById("graph"); var g = new Dygraph(graph, ZERO_TO_FIFTY, opts); - htx = g.hidden_ctx_; + var htx = g.hidden_ctx_; CanvasAssertions.assertLineDrawn(htx, [0,320], [475,6.2745], { strokeStyle: "#008080", @@ -90,3 +90,15 @@ SimpleDrawingTestCase.prototype.testDrawSimpleDash = function() { assertEquals(29, CanvasAssertions.numLinesDrawn(htx, "#ff0000")); CanvasAssertions.assertBalancedSaveRestore(htx); }; + +SimpleDrawingTestCase.prototype.testSeparatedPointsDontDraw = function() { + var graph = document.getElementById("graph"); + var g = new Dygraph( + graph, + [[1, 10, 11], [2, 11, null], [3, 12, 13]], + { colors: ['red', 'blue']}); + var htx = g.hidden_ctx_; + assertEquals(2, CanvasAssertions.numLinesDrawn(htx, '#ff0000')); + assertEquals(0, CanvasAssertions.numLinesDrawn(htx, '#0000ff')); +} + -- 2.7.4