2 * @fileoverview Tests that we don'show specify hours, minutes or seconds
3 * in your dates if you don't specify them. This can get mixed up becaues of
6 * @author danvk@google.com (Dan Vanderkam)
8 var noHoursTestCase
= TestCase("no-hours");
10 noHoursTestCase
.prototype.setUp
= function() {
11 document
.body
.innerHTML
= "<div id='graph'></div>";
14 noHoursTestCase
.prototype.tearDown
= function() {
17 noHoursTestCase
.prototype.testNoHours
= function() {
22 var data
= "Date,Y\n" +
29 var graph
= document
.getElementById("graph");
30 var g
= new Dygraph(graph
, data
, opts
);
33 assertEquals("2012/03/13: Y: -1", Util
.getLegend());
36 assertEquals("2012/03/14: Y: 0", Util
.getLegend());
39 assertEquals("2012/03/15: Y: 1", Util
.getLegend());
42 assertEquals("2012/03/16: Y: 0", Util
.getLegend());
45 noHoursTestCase
.prototype.testNoHoursDashed
= function() {
50 var data
= "Date,Y\n" +
57 var graph
= document
.getElementById("graph");
58 var g
= new Dygraph(graph
, data
, opts
);
61 assertEquals("2012/03/13: Y: -1", Util
.getLegend());
64 assertEquals("2012/03/14: Y: 0", Util
.getLegend());
67 assertEquals("2012/03/15: Y: 1", Util
.getLegend());
70 assertEquals("2012/03/16: Y: 0", Util
.getLegend());