gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Date.as


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Date.as
Date: Thu, 25 Oct 2007 22:27:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/10/25 22:27:07

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Date.as 

Log message:
                * testsuite/actionscript.all/Date.as: couple more tests.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4714&r2=1.4715
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Date.as?cvsroot=gnash&r1=1.30&r2=1.31

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4714
retrieving revision 1.4715
diff -u -b -r1.4714 -r1.4715
--- ChangeLog   25 Oct 2007 17:53:55 -0000      1.4714
+++ ChangeLog   25 Oct 2007 22:27:06 -0000      1.4715
@@ -1,5 +1,6 @@
 2007-10-25 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/Date.as: couple more tests.
        * testsuite/actionscript.all/targetPath.as: add a failing test
          as borrowed from swfdec
        * testsuite/actionscript.all/MovieClip.as: test _parent is not

Index: testsuite/actionscript.all/Date.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Date.as,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- testsuite/actionscript.all/Date.as  25 Oct 2007 15:48:17 -0000      1.30
+++ testsuite/actionscript.all/Date.as  25 Oct 2007 22:27:06 -0000      1.31
@@ -21,11 +21,20 @@
 // 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.30 2007/10/25 15:48:17 udog Exp $";
+rcsid="$Id: Date.as,v 1.31 2007/10/25 22:27:06 strk Exp $";
 
 #include "check.as"
 
-check (Date);
+check_equals(typeof(Date), 'function');
+check_equals(typeof(Date.prototype), 'object');
+check_equals(typeof(Date.prototype.__proto__), 'object');
+check_equals(Date.prototype.__proto__, Object.prototype);
+#if OUTPUT_VERSION > 5
+ check_equals(typeof(Date.__proto__), 'object');
+ check_equals(Date.__proto__, Function.prototype);
+#else
+ xcheck_equals(typeof(Date.__proto__), 'undefined');
+#endif
 
 // Static method should be available even if you haven't asked for a Date 
object.
 //
@@ -184,6 +193,7 @@
 // One numeric argument sets milliseconds since 1970 UTC
     delete d; var d = new Date(0);
        // Check UTC "get" methods too
+       check_equals(typeof(d.valueOf()), 'number');
        check_equals(d.valueOf(), 0);
        check_equals(typeof(d.getTime()), 'number'); 
        check_equals(d.getTime(), 0);
@@ -509,8 +519,14 @@
 // Check if Date, concatenated to a string, is in human readable form
 d = new Date(2000, 1, 15, 0, 0, 0); 
 var foo = "foo "+d;   
+check_equals(typeof(foo), 'string');
 // correct: "foo Tue Feb 15 00:00:00 GMT+0100 2000"
 // but this probably depends on time zone, so just check for some fixed part..
-check_equals(foo.indexOf("Feb"), 8);
+#if OUTPUT_VERSION > 5
+ check_equals(foo.indexOf("Feb"), 8);
+#else
+ // correct: "foo 950569200000"
+ check_equals(foo.substring(0, 10), 'foo 950569');
+#endif
 
 totals();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]