Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1300)

Unified Diff: test/mjsunit/date-parse.js

Issue 42280: Made Date parser work on flat strings instead of arbitrary ones. (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/dateparser.cc ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/date-parse.js
diff --git a/test/mjsunit/date-parse.js b/test/mjsunit/date-parse.js
index 1e09db5bc069d937ce715aa375e94ccd6d9d555f..379d1533a778c384aaab895a8629426639869166 100644
--- a/test/mjsunit/date-parse.js
+++ b/test/mjsunit/date-parse.js
@@ -41,12 +41,12 @@ function testDateParse(string) {
// number of milliseconds to make it timezone independent.
function testDateParseLocalTime(string) {
var d = Date.parse(string);
- assertTrue(d > 0 && !isNaN(d));
+ assertTrue(d > 0 && !isNaN(d), string);
Erik Corry 2009/03/17 13:09:01 This should be two assertions.
};
function testDateParseMisc(array) {
- assertTrue(array.length == 2);
+ assertTrue(array.length == 2, "array [" + array + "] length != 2");
Erik Corry 2009/03/17 13:09:01 This should be assertEquals(2, array.length, ...)
var string = array[0];
var expected = array[1];
var d = Date.parse(string);
@@ -262,4 +262,6 @@ var testCasesNegative = [
'May 25 2008 1:30( )AM (PM)',
'May 25 2008 AAA (GMT)'];
-testCasesNegative.forEach(function (s) { assertTrue(isNaN(Date.parse(s))); });
+testCasesNegative.forEach(function (s) {
+ assertTrue(isNaN(Date.parse(s)), s);
+});
« src/dateparser.cc ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698