[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/actionscript.all Date.as
From: |
Martin Guy |
Subject: |
[Gnash-commit] gnash/testsuite/actionscript.all Date.as |
Date: |
Sat, 03 Mar 2007 17:27:30 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Martin Guy <martinwguy> 07/03/03 17:27:30
Modified files:
testsuite/actionscript.all: Date.as
Log message:
Check for Date.UTC() existing and working even before a Date object is
instantiated
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Date.as?cvsroot=gnash&r1=1.18&r2=1.19
Patches:
Index: Date.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Date.as,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- Date.as 3 Mar 2007 11:29:46 -0000 1.18
+++ Date.as 3 Mar 2007 17:27:29 -0000 1.19
@@ -20,12 +20,18 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Date.as,v 1.18 2007/03/03 11:29:46 martinwguy Exp $";
+rcsid="$Id: Date.as,v 1.19 2007/03/03 17:27:29 martinwguy Exp $";
#include "check.as"
check (Date);
+// Static method should be available even if you haven't asked for a Date
object.
+//
+// We have to specify "000.0" bucause ming fails to parse large integer
constants,
+// returning 2147483647 instead of the correct value.
+check_equals (Date.UTC(2000,0,1).valueOf(), 946684800000.0);
+
// test the Date constructor.
// This specific value is used below to check conversion back to year/mon/day
etc
var d = new Date(70,1,2,3,4,5,6);