[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-mtasc.all Base1.as Derived...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-mtasc.all Base1.as Derived... |
Date: |
Wed, 10 Oct 2007 09:13:55 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/10/10 09:13:55
Modified files:
testsuite/misc-mtasc.all: Base1.as Derived1.as super_test1.as
Log message:
add a few tests for this pointers, not executed due to the 'ActionLimit
hit' at the moment.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Base1.as?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Derived1.as?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/super_test1.as?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: Base1.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/Base1.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Base1.as 10 Oct 2007 05:41:05 -0000 1.1
+++ Base1.as 10 Oct 2007 09:13:55 -0000 1.2
@@ -2,10 +2,12 @@
class Base1
{
var baseCtorCalled;
+ var baseThisPtr;
// constructor
function Base1()
{
this.baseCtorCalled = true;
+ baseThisPtr = this;
}
}
Index: Derived1.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/Derived1.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Derived1.as 10 Oct 2007 05:41:05 -0000 1.1
+++ Derived1.as 10 Oct 2007 09:13:55 -0000 1.2
@@ -4,11 +4,13 @@
class Derived1 extends Base1
{
var derived1CtorCalled;
+ var derivedThisPtr;
// constructor
function Derived1()
{
super();
this.derived1CtorCalled = true;
+ derivedThisPtr = this;
}
}
Index: super_test1.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/super_test1.as,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- super_test1.as 10 Oct 2007 05:49:35 -0000 1.2
+++ super_test1.as 10 Oct 2007 09:13:55 -0000 1.3
@@ -28,12 +28,14 @@
class Derived11 extends Derived1
{
var derived11CtorCalled;
+ var thisPtr;
// constructor
function Derived11()
{
super();
this.derived11CtorCalled = true;
+ thisPtr = this;
}
static function main()
@@ -42,9 +44,14 @@
var derivedObj = new Derived11();
// check that all constructors in the inheritance chain are called.
- check_equals(derivedObj.derived11CtorCalled, true);
- check_equals(derivedObj.derived1CtorCalled, true);
check_equals(derivedObj.baseCtorCalled, true);
+ check_equals(derivedObj.derived1CtorCalled, true);
+ check_equals(derivedObj.derived11CtorCalled, true);
+
+ // check this pointers.
+ check_equals(derivedObj.thisPtr, derivedObj);
+ check_equals(derivedObj.derivedThisPtr, derivedObj);
+ check_equals(derivedObj.baseThisPtr, derivedObj);
Dejagnu.done();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/testsuite/misc-mtasc.all Base1.as Derived...,
Zou Lunkai <=