gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/asobj/Date.cpp testsuite...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog server/asobj/Date.cpp testsuite...
Date: Thu, 10 Apr 2008 16:55:12 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/04/10 16:55:12

Modified files:
        .              : ChangeLog 
        server/asobj   : Date.cpp 
        testsuite/actionscript.all: Date.as 

Log message:
                * testsuite/actionscript.all: Date constructor tests.
                * server/asobj/Date.cpp: correct constructor to return
                  current time when not called with new.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6241&r2=1.6242
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Date.as?cvsroot=gnash&r1=1.51&r2=1.52

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6241
retrieving revision 1.6242
diff -u -b -r1.6241 -r1.6242
--- ChangeLog   10 Apr 2008 15:33:17 -0000      1.6241
+++ ChangeLog   10 Apr 2008 16:55:10 -0000      1.6242
@@ -1,3 +1,9 @@
+2008-04-10 Benjamin Wolsey <address@hidden>
+
+       * testsuite/actionscript.all: Date constructor tests.
+       * server/asobj/Date.cpp: correct constructor to return
+         current time when not called with new.
+
 2008-04-10 Sandro Santilli <address@hidden>
 
        * server/edit_text_character.cpp (setTextFormat): don't

Index: server/asobj/Date.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Date.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- server/asobj/Date.cpp       7 Apr 2008 10:59:27 -0000       1.63
+++ server/asobj/Date.cpp       10 Apr 2008 16:55:11 -0000      1.64
@@ -361,7 +361,7 @@
     }
 
     // TODO: move this to date_as_object constructor
-    if (fn.nargs < 1 || fn.arg(0).is_undefined()) {
+    if (fn.nargs < 1 || fn.arg(0).is_undefined() || !(fn.isInstantiation()) ) {
         // Set from system clock
         date->value = clocktime::getTicks();
     }

Index: testsuite/actionscript.all/Date.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Date.as,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- testsuite/actionscript.all/Date.as  7 Apr 2008 13:14:54 -0000       1.51
+++ testsuite/actionscript.all/Date.as  10 Apr 2008 16:55:11 -0000      1.52
@@ -22,7 +22,7 @@
 // execute it like this gnash -1 -r 0 -v out.swf
 
 
-rcsid="$Id: Date.as,v 1.51 2008/04/07 13:14:54 bwy Exp $";
+rcsid="$Id: Date.as,v 1.52 2008/04/10 16:55:11 bwy Exp $";
 #include "check.as"
 
 check_equals(typeof(Date), 'function');
@@ -617,6 +617,13 @@
 d.setUTCHours(0, 0, 0, 0);
 check (Date.UTC(2000,6,1,0,0,0,0) == d.valueOf());
 
+d1 = Date(123);
+d2 = new Date;
+check_equals(d1.toString(), d2.toString());
+
+d1 = Date(2008, 10, 10, 10, 10, 10, 10);
+d2 = new Date;
+check_equals(d1.toString(), d2.toString());
 
 xcheck_equals (Date.UTC(-1000, 20).valueOf(), -33713366400000);
 xcheck_equals (Date.UTC(-70, 0).toString(), "-4417977600000");
@@ -659,7 +666,7 @@
 #endif
 
 #if OUTPUT_VERSION == 5
-totals(280);
+totals(282);
 #else
-totals (322);
+totals (324);
 #endif




reply via email to

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