The awful index-based iterators are gone, replaced with iterator objects - code is...
[dygraphs.git] / auto_tests / tests / pathological_cases.js
CommitLineData
395e98a3
DV
1/**
2 * @fileoverview Tests zero and one-point charts.
3 * These don't have to render nicely, they just have to not crash.
4 *
5 * @author dan@dygraphs.com (Dan Vanderkam)
6 */
7var pathologicalCasesTestCase = TestCase("pathological-cases");
8
9pathologicalCasesTestCase.prototype.setUp = function() {
10 document.body.innerHTML = "<div id='graph'></div>";
11};
12
13pathologicalCasesTestCase.prototype.tearDown = function() {
14};
15
16pathologicalCasesTestCase.prototype.testZeroPoint = function() {
17 var opts = {
18 width: 480,
19 height: 320
20 };
21 var data = "X,Y\n";
22
23 var graph = document.getElementById("graph");
24 var g = new Dygraph(graph, data, opts);
25};
26
27pathologicalCasesTestCase.prototype.testOnePoint = function() {
28 var opts = {
29 width: 480,
30 height: 320
31 };
32 var data = "X,Y\n" +
33 "1,2\n";
34
35 var graph = document.getElementById("graph");
36 var g = new Dygraph(graph, data, opts);
37};
e0ff43a1
DV
38
39pathologicalCasesTestCase.prototype.testNullLegend = function() {
40 var opts = {
41 width: 480,
42 height: 320,
43 labelsDiv: null
44 };
45 var data = "X,Y\n" +
46 "1,2\n";
47
48 var graph = document.getElementById("graph");
49 var g = new Dygraph(graph, data, opts);
50};