[webkit-changes] cvs commit:
JavaScriptCore/tests/mozilla/ecma_3/Date 15.9.5.5.js
Darin
darin at opensource.apple.com
Mon Aug 15 13:37:10 PDT 2005
darin 05/08/15 13:37:10
Modified: . ChangeLog
tests/mozilla/ecma_3/Date 15.9.5.5.js
Log:
Reviewed by Darin.
* tests/mozilla/ecma_3/Date/15.9.5.5.js:
Remove the code which tests that Date.toLocaleString should be parsable
by Date.parse. That is not true according to the spec.
Revision Changes Path
1.799 +8 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.798
retrieving revision 1.799
diff -u -r1.798 -r1.799
--- ChangeLog 15 Aug 2005 18:47:48 -0000 1.798
+++ ChangeLog 15 Aug 2005 20:37:09 -0000 1.799
@@ -1,3 +1,11 @@
+2005-08-15 Anders Carlsson <andersca at mac.com>
+
+ Reviewed by Darin.
+
+ * tests/mozilla/ecma_3/Date/15.9.5.5.js:
+ Remove the code which tests that Date.toLocaleString should be parsable
+ by Date.parse. That is not true according to the spec.
+
2005-08-15 Darin Adler <darin at apple.com>
Reviewed by Geoff.
1.2 +1 -48 JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.5.js
Index: 15.9.5.5.js
===================================================================
RCS file: /cvs/root/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.5.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 15.9.5.5.js 13 Oct 2003 02:05:32 -0000 1.1
+++ 15.9.5.5.js 15 Aug 2005 20:37:10 -0000 1.2
@@ -27,7 +27,7 @@
implementation dependent, but are intended to represent the "date"
portion of the Date in the current time zone in a convenient,
human-readable form. We can't test the content of the string,
- but can verify that the string is parsable by Date.parse
+ but can verify that the object returned is a string.
The toLocaleString function is not generic; it generates a runtime error
if its 'this' value is not a Date object. Therefore it cannot be transferred
@@ -67,42 +67,6 @@
expect = 0;
addTestCase();
- // Date.parse is accurate to the second; valueOf() to the millisecond -
- status = "Math.abs(Date.parse(now.toLocaleString()) - now.valueOf()) < 1000";
- actual = Math.abs(Date.parse(now.toLocaleString()) - now.valueOf()) < 1000;
- expect = true;
- addTestCase();
-
-
-
- // 1970
- addDateTestCase(0);
- addDateTestCase(TZ_ADJUST);
-
-
- // 1900
- addDateTestCase(TIME_1900);
- addDateTestCase(TIME_1900 -TZ_ADJUST);
-
-
- // 2000
- addDateTestCase(TIME_2000);
- addDateTestCase(TIME_2000 -TZ_ADJUST);
-
-
- // 29 Feb 2000
- addDateTestCase(UTC_29_FEB_2000);
- addDateTestCase(UTC_29_FEB_2000 - 1000);
- addDateTestCase(UTC_29_FEB_2000 - TZ_ADJUST);
-
-
- // 2005
- addDateTestCase(UTC_1_JAN_2005);
- addDateTestCase(UTC_1_JAN_2005 - 1000);
- addDateTestCase(UTC_1_JAN_2005-TZ_ADJUST);
-
-
-
//-----------------------------------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------------------------------
@@ -114,17 +78,6 @@
}
-function addDateTestCase(date_given_in_milliseconds)
-{
- var givenDate = new Date(date_given_in_milliseconds);
-
- status = 'Date.parse(' + givenDate + ').toLocaleString())';
- actual = Date.parse(givenDate.toLocaleString());
- expect = date_given_in_milliseconds;
- addTestCase();
-}
-
-
function test()
{
for ( tc=0; tc < testcases.length; tc++ )
More information about the webkit-changes
mailing list