[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/actionscript.all Object.as
From: |
strk |
Subject: |
[Gnash-commit] gnash/testsuite/actionscript.all Object.as |
Date: |
Sat, 04 Feb 2006 15:28:30 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: strk <address@hidden> 06/02/04 15:28:30
Modified files:
testsuite/actionscript.all: Object.as
Log message:
Added another test and comments about which opcode are used in which
operation (incomplete)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/Object.as.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnash/testsuite/actionscript.all/Object.as
diff -u gnash/testsuite/actionscript.all/Object.as:1.2
gnash/testsuite/actionscript.all/Object.as:1.3
--- gnash/testsuite/actionscript.all/Object.as:1.2 Fri Feb 3 15:57:21 2006
+++ gnash/testsuite/actionscript.all/Object.as Sat Feb 4 15:28:30 2006
@@ -28,7 +28,7 @@
#endif
// Test Object creation using 'new'
-var obj = new Object;
+var obj = new Object; // uses SWFACTION_NEWOBJECT
if (obj != undefined) {
if ( typeof(obj) == "object" ) {
trace("PASSED: 'new Object'");
@@ -39,11 +39,24 @@
trace("FAILED: 'new Object' is undefined");
}
+// Test instantiated Object members
+obj.member = 1;
+if ( obj.member == 1 ) {
+ trace("PASSED: explicitly set member on instantiated Object is
correctly set");
+} else {
+ if ( obj.member == undefined ) {
+ trace("FAILED: explicitly set member on instantiated Object is
undefined");
+ } else {
+ trace("FAILED: explicitly set member on instantiated Object is
"+obj.member+" (should be 1)");
+ }
+}
+
// Test Object creation using literal initialization
-var obj = { member:1 };
+var obj = { member:1 }; // uses SWFACTION_INITOBJECT
+
if (obj != undefined) {
if ( typeof(obj) == "object" ) {
- trace("PASSED: 'obj = { ... }'");
+ trace("PASSED: 'obj = { ... }' is of type 'object'");
} else {
trace("FAILED: 'obj = { ... }' is a "+typeof(obj));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/testsuite/actionscript.all Object.as,
strk <=