gnash-commit
[Top][All Lists]
Advanced

[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: Tue, 23 Jan 2007 17:49:51 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/23 17:49:51

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Inheritance.as 

Log message:
                * testsuite/actionscript.all/Inheritance.as: Test access of
                  builtin methods or gettersetter properties from user defined
                  objects.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2159&r2=1.2160
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.19&r2=1.20

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2159
retrieving revision 1.2160
diff -u -b -r1.2159 -r1.2160
--- ChangeLog   23 Jan 2007 17:43:09 -0000      1.2159
+++ ChangeLog   23 Jan 2007 17:49:50 -0000      1.2160
@@ -8,6 +8,9 @@
          so return for invalid calls is always undefined.
        * testsuite/actionscript.all/Date.as: don't expect a failure
          on dateInstance.UTC being undefined.
+       * testsuite/actionscript.all/Inheritance.as: Test access of
+         builtin methods or gettersetter properties from user defined
+         objects.
 
 2007-01-23 Tomas Groth Christensen <address@hidden>
 

Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- testsuite/actionscript.all/Inheritance.as   23 Jan 2007 12:40:21 -0000      
1.19
+++ testsuite/actionscript.all/Inheritance.as   23 Jan 2007 17:49:51 -0000      
1.20
@@ -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: Inheritance.as,v 1.19 2007/01/23 12:40:21 strk Exp $";
+rcsid="$Id: Inheritance.as,v 1.20 2007/01/23 17:49:51 strk Exp $";
 
 #include "check.as"
 
@@ -217,8 +217,53 @@
        extends
 };
 var myInstance = new MyClass();
-myInstance._x = 4;
-check_equals(myInstance._x, 4);
+check(_root instanceOf MovieClip);
+check_equals(MyClass.prototype.constructor, MovieClip);
+check_equals(myInstance.__proto__, MyClass.prototype);
+check_equals(typeof(MovieClip.prototype._x), 'undefined');
 
 #endif // MING_SUPPORTS_ASM_EXTENDS
 
+//------------------------------------------------
+// Test access of builtin methods or getter/setter
+// from a user-defined instance.
+//------------------------------------------------
+
+function Test() {}
+xcheck_equals(typeof(Date.prototype), 'object');
+Test.prototype = new Date();
+var t = new Test;
+check_equals(typeof(t.getYear), 'function');
+check_equals(typeof(t.setYear), 'function');
+t.setYear(2007);
+check_equals(typeof(t.getYear()), 'undefined');
+
+var t2 = new Object;
+t2.__proto__ = Date.prototype;
+xcheck_equals(typeof(t2.getYear), 'function');
+xcheck_equals(typeof(t2.setYear), 'function');
+t2.setYear(2007);
+check_equals(typeof(t2.getYear()), 'undefined');
+
+var t3 = new Object;
+t3.__proto__ = MovieClip.prototype;
+check_equals(typeof(t4.gotoAndStop), 'undefined');
+check_equals(typeof(t3._currentframe), 'undefined');
+t3._currentframe = 10;
+check_equals(typeof(t3._currentframe), 'number');
+
+function Test4() {}
+Test3.prototype = new MovieClip;
+var t4 = new Test4;
+check_equals(typeof(t4.gotoAndStop), 'undefined');
+check_equals(typeof(t4._currentframe), 'undefined');
+t4._currentframe = 10;
+check_equals(typeof(t4._currentframe), 'number');
+
+check_equals(typeof(_root.gotoAndPlay), 'function');
+t4.die = _root.gotoAndPlay;
+check_equals(typeof(t4.die), 'function');
+var b = t4.die(4);
+check_equals(typeof(b), 'undefined');
+
+




reply via email to

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