[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... |
Date: |
Thu, 24 Apr 2008 18:29:46 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/04/24 18:29:46
Modified files:
. : ChangeLog
testsuite/actionscript.all: Inheritance.as
Log message:
Tests for implementsop
(probably need a specific Ming version, overlooked it for now).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6386&r2=1.6387
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.58&r2=1.59
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6386
retrieving revision 1.6387
diff -u -b -r1.6386 -r1.6387
--- ChangeLog 24 Apr 2008 16:53:04 -0000 1.6386
+++ ChangeLog 24 Apr 2008 18:29:46 -0000 1.6387
@@ -1,5 +1,8 @@
2008-04-24 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/Inheritance.as:
+ Tests for implementsop (probably need a specific
+ Ming version, overlooked it for now).
* testsuite/misc-mtasc.all/implementsOpTest.as:
More failing tests.
Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- testsuite/actionscript.all/Inheritance.as 24 Apr 2008 16:39:22 -0000
1.58
+++ testsuite/actionscript.all/Inheritance.as 24 Apr 2008 18:29:46 -0000
1.59
@@ -21,7 +21,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Inheritance.as,v 1.58 2008/04/24 16:39:22 strk Exp $";
+rcsid="$Id: Inheritance.as,v 1.59 2008/04/24 18:29:46 strk Exp $";
#include "check.as"
check_equals(typeof(Object.prototype.constructor), 'function');
@@ -524,8 +524,43 @@
check(t4 instanceOf Test4);
check(! t4 instanceOf Test5);
+//------------------------------------------------
+// Test implements op
+//------------------------------------------------
+
+A = {};
+A.prototype = {}; // need a prototype to set as interface of B.prototype
+B = {};
+B.prototype = {}; // need a prototype to register interfaces on
+
+asm {
+ push "A"
+ getvariable
+ push 1 // 1 interface to register
+ push "B"
+ getvariable
+ implements // will register A.prototype as an interface of B.prototype
+};
+
+ob = {};
+check (! ob instanceof A );
+ob.__proto__ = B.prototype;
+xcheck ( ob instanceof A );
+
+// Set A.prototype as a prototype of another object
+// and see if now ob results an instance of that other
+// object.. (it is)
+C = {};
+check (! ob instanceof C );
+C.prototype = A.prototype;
+xcheck ( ob instanceof C );
+
+//------------------------------------------------
+// END OF TEST
+//------------------------------------------------
+
#if OUTPUT_VERSION < 6
- check_totals(102); // SWF5
+ check_totals(106); // SWF5
#else
- check_totals(159); // SWF6,7,8
+ check_totals(163); // SWF6,7,8
#endif