[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: |
Wed, 12 Sep 2007 17:15:11 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/12 17:15:11
Modified files:
. : ChangeLog
testsuite/actionscript.all: Inheritance.as
Log message:
* testsuite/actionscript.all/Inheritance.as: more tests for
'super'.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4297&r2=1.4298
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.40&r2=1.41
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4297
retrieving revision 1.4298
diff -u -b -r1.4297 -r1.4298
--- ChangeLog 12 Sep 2007 17:13:29 -0000 1.4297
+++ ChangeLog 12 Sep 2007 17:15:11 -0000 1.4298
@@ -1,3 +1,7 @@
+2007-09-12 Sandro Santilli <address@hidden>
+
+ * testsuite/actionscript.all/Inheritance.as: more tests for 'super'.
+
2007-09-12 Bastiaan Jacques <address@hidden>
* backend/render_handler_ogl.cpp: Use the average of X and Y scaling
Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- testsuite/actionscript.all/Inheritance.as 12 Sep 2007 11:55:53 -0000
1.40
+++ testsuite/actionscript.all/Inheritance.as 12 Sep 2007 17:15:11 -0000
1.41
@@ -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.40 2007/09/12 11:55:53 strk Exp $";
+rcsid="$Id: Inheritance.as,v 1.41 2007/09/12 17:15:11 strk Exp $";
#include "check.as"
@@ -202,9 +202,35 @@
var derived = new DerivedClass();
var greeting = derived.saySuperHello();
check_equals(greeting, "Hello from BaseClass");
+
+DerivedClass.prototype.typeofSuper = function() { return typeof(super); };
+check_equals(derived.typeofSuper(), 'object');
+xcheck_equals(DerivedClass.prototype.typeofSuper(), 'object');
+
+DerivedClass.prototype.getSuper = function() { return super; };
+s = derived.getSuper();
+check_equals(typeof(s), 'object');
+check_equals(s.sayHello, BaseClass.prototype.sayHello);
+xcheck(!s.hasOwnProperty('sayHello')); // sayHello is not copied to 's'
+check_equals(s.__proto__, Object.prototype); // nor it's found in __proto__
+check_equals(typeof(s.prototype), 'undefined');
+check_equals(typeof(s.constructor), 'function');
+check_equals(s.constructor, BaseClass); // maybe sayHello is looked for here...
+check_equals(typeof(s.__constructor__), 'undefined');
+xcheck(s != BaseClass.prototype);
+
+DerivedClass.prototype.typeofThis = function() { return typeof(this); };
+check_equals(derived.typeofThis(), 'object');
+check_equals(DerivedClass.prototype.typeofThis(), 'object');
+
+DerivedClass.prototype.getThis = function() { return this; };
+check_equals(derived.getThis(), derived);
+check_equals(DerivedClass.prototype.getThis(), DerivedClass.prototype);
+
#endif // OUTPUT_VERSION > 5
check_equals(super, undefined);
+
function A() {}
A.prototype.whoami = function() {
return "A";