From: Robert Konigsberg Date: Wed, 13 Jun 2012 14:29:11 +0000 (-0400) Subject: Add test case which confirms regression reported in https://issuenav.googleplex.com... X-Git-Tag: v1.0.0~238^2^2~30 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=c20eabd3c06287d70316ab453428bb566903d651;p=dygraphs.git Add test case which confirms regression reported in https://issuenav.googleplex.com/issues/dygraphs/336 --- 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')); +} +