[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Func...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Func... |
Date: |
Sun, 04 Mar 2007 00:17:05 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/03/04 00:17:05
Modified files:
. : ChangeLog
testsuite/actionscript.all: Function.as
Log message:
* testsuite/actionscript.all/Function.as:
Test using 'this' as a constructor. Doesn't currently
work becase the 'this' as value is initialized to be
of kind OBJECT rather then AS_FUNCTION (as_value constructor
by as_object doesn't check real type).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2526&r2=1.2527
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Function.as?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2526
retrieving revision 1.2527
diff -u -b -r1.2526 -r1.2527
--- ChangeLog 3 Mar 2007 17:29:12 -0000 1.2526
+++ ChangeLog 4 Mar 2007 00:17:04 -0000 1.2527
@@ -1,3 +1,11 @@
+2007-03-03 Sandro Santilli <address@hidden>
+
+ * testsuite/actionscript.all/Function.as:
+ Test using 'this' as a constructor. Doesn't currently
+ work becase the 'this' as value is initialized to be
+ of kind OBJECT rather then AS_FUNCTION (as_value constructor
+ by as_object doesn't check real type).
+
2007-03-03 Martin Guy <address@hidden>
* server/as_value.cpp: More conservative version of NAN fixes.
Index: testsuite/actionscript.all/Function.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Function.as,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- testsuite/actionscript.all/Function.as 28 Feb 2007 23:58:26 -0000
1.24
+++ testsuite/actionscript.all/Function.as 4 Mar 2007 00:17:04 -0000
1.25
@@ -20,7 +20,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Function.as,v 1.24 2007/02/28 23:58:26 strk Exp $";
+rcsid="$Id: Function.as,v 1.25 2007/03/04 00:17:04 strk Exp $";
#include "check.as"
@@ -386,3 +386,22 @@
}
check_equals(factorial(3), 6);
check_equals(factorial(4), 24);
+
+//------------------------------------------------------
+// Test using 'this' as a constructor
+//------------------------------------------------------
+
+#if OUTPUT_VERSION >= 6
+
+Function.prototype.new = function()
+{
+ return new this;
+};
+
+function Foo() {};
+
+var fooInstance = Foo.new();
+check_equals(typeof(fooInstance), 'object');
+check(fooInstance instanceOf Foo);
+
+#endif // OUTPUT_VERSION >= 6
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Func...,
Sandro Santilli <=