[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ASna...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ASna... |
Date: |
Wed, 16 Apr 2008 06:54:35 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/04/16 06:54:35
Modified files:
. : ChangeLog
testsuite/actionscript.all: ASnative.as
server/asobj : Global.cpp
Log message:
* server/asobj/Global.cpp: init Date class at startup
so that its ASnative functions are registered.
* testsuite/actionscript.all/ASnative.cpp: test Date
ASnative getter functions (all fine now).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6288&r2=1.6289
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/ASnative.as?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.110&r2=1.111
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6288
retrieving revision 1.6289
diff -u -b -r1.6288 -r1.6289
--- ChangeLog 15 Apr 2008 20:21:06 -0000 1.6288
+++ ChangeLog 16 Apr 2008 06:54:34 -0000 1.6289
@@ -1,3 +1,10 @@
+2008-04-15 Benjamin Wolsey <address@hidden>
+
+ * server/asobj/Global.cpp: init Date class at startup
+ so that its ASnative functions are registered.
+ * testsuite/actionscript.all/ASnative.cpp: test Date
+ ASnative getter functions (all fine now).
+
2008-04-15 Russ Nelson <address@hidden>
* consolidate all ERROR messages for display at the end of
Index: testsuite/actionscript.all/ASnative.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/ASnative.as,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/actionscript.all/ASnative.as 15 Apr 2008 15:18:01 -0000
1.2
+++ testsuite/actionscript.all/ASnative.as 16 Apr 2008 06:54:35 -0000
1.3
@@ -15,9 +15,65 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-rcsid="$Id: ASnative.as,v 1.2 2008/04/15 15:18:01 bwy Exp $";
+rcsid="$Id: ASnative.as,v 1.3 2008/04/16 06:54:35 bwy Exp $";
#include "check.as"
+
+// Do this first to make sure ASnative is
+// register before Date class itself is called.
+a = ASnative(103, 257);
+check_equals (a(65, 1, 1, 1, 1, 1, 1), Date.UTC(65, 1, 1, 1, 1, 1, 1));
+
+d = new Date (123456789);
+
+d.a = ASnative(103, 0);
+check_equals (d.a(), d.getFullYear());
+
+d.a = ASnative(103, 1);
+check_equals (d.a(), d.getYear());
+
+d.a = ASnative(103, 2);
+check_equals (d.a(), d.getMonth());
+
+d.a = ASnative(103, 3);
+check_equals (d.a(), d.getDate());
+d.a = ASnative(103, 4);
+check_equals (d.a(), d.getDay());
+d.a = ASnative(103, 5);
+check_equals (d.a(), d.getHours());
+d.a = ASnative(103, 6);
+check_equals (d.a(), d.getMinutes());
+d.a = ASnative(103, 7);
+check_equals (d.a(), d.getSeconds());
+d.a = ASnative(103, 8);
+check_equals (d.a(), d.getMilliseconds());
+d.a = ASnative(103, 16);
+check_equals (d.a(), d.getTime());
+d.a = ASnative(103, 18);
+check_equals (d.a(), d.getTimezoneOffset());
+d.a = ASnative(103, 19);
+check_equals (d.a(), d.toString());
+d.a = ASnative(103, 128);
+check_equals (d.a(), d.getUTCFullYear());
+d.a = ASnative(103, 129);
+check_equals (d.a(), d.getUTCYear());
+d.a = ASnative(103, 130);
+check_equals (d.a(), d.getUTCMonth());
+d.a = ASnative(103, 131);
+check_equals (d.a(), d.getUTCDate());
+d.a = ASnative(103, 132);
+check_equals (d.a(), d.getUTCDay());
+d.a = ASnative(103, 133);
+check_equals (d.a(), d.getUTCHours());
+d.a = ASnative(103, 134);
+check_equals (d.a(), d.getUTCMinutes());
+d.a = ASnative(103, 135);
+check_equals (d.a(), d.getUTCSeconds());
+d.a = ASnative(103, 136);
+check_equals (d.a(), d.getUTCMilliseconds());
+d.a = ASnative(103, 1);
+check_equals (d.a(), d.getYear());
+
countVO = 0;
countTS = 0;
@@ -126,7 +182,7 @@
xcheck_equals (countVO, 25);
#if OUTPUT_VERSION > 5
-check_totals(36);
+check_totals(59);
#else
-check_totals(34);
+check_totals(57);
#endif
Index: server/asobj/Global.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- server/asobj/Global.cpp 15 Apr 2008 15:18:02 -0000 1.110
+++ server/asobj/Global.cpp 16 Apr 2008 06:54:35 -0000 1.111
@@ -606,9 +606,12 @@
init_member("NaN", as_value(NAN));
init_member("Infinity", as_value(INFINITY));
+ // The following initializations are necessary
+ // to register ASnative functions
color_class_init(*this);
textformat_class_init(*this);
math_class_init(*this);
+ date_class_init(*this);
if ( vm.getSWFVersion() < 6 ) goto extscan;
//-----------------------
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ASna..., Benjamin Wolsey, 2008/04/16
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/ASna..., Benjamin Wolsey, 2008/04/20