gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11422: Updates to haxe tests, Array


From: Jon Crider
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11422: Updates to haxe tests, Array still needs work
Date: Thu, 13 Aug 2009 20:23:22 -0600
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11422 [merge]
committer: Jon Crider <address@hidden>
branch nick: trunk
timestamp: Thu 2009-08-13 20:23:22 -0600
message:
  Updates to haxe tests, Array still needs work
modified:
  testsuite/misc-haxe.all/classes.all/Array_as.hx
  testsuite/misc-haxe.all/classes.all/display/BitmapData_as.hx
  testsuite/misc-haxe.all/classes.all/display/DisplayObject_as.hx
=== modified file 'testsuite/misc-haxe.all/classes.all/Array_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/Array_as.hx   2009-06-22 21:33:57 
+0000
+++ b/testsuite/misc-haxe.all/classes.all/Array_as.hx   2009-08-14 02:20:48 
+0000
@@ -552,8 +552,7 @@
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] tmp Array elements not 
initialized correctly");
     }
-    #end
-    #if !flash6
+    #else
     if ( tmp.toString() == "undefined,undefined") {
         DejaGnu.pass("tmp Array elements correctly initialized");
     } else {
@@ -1111,13 +1110,24 @@
     //DejaGnu.note("array = " + trysortarray.toString());
     var testCmpBogus1 = function (x,y) {return -1;}
     trysortarray.sort( testCmpBogus1 );
-    //DejaGnu.note("array = " + trysortarray.toString());
     // this sort fails in gflashplayer. does as3 iterate or sort differently?
+#if !flash9
     if (trysortarray.toString() == "But,alphabet,Different,capitalization") {
         DejaGnu.pass("custom sort returned correct array");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort did not return 
correct array");
-    }
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort did not return"+
+                     " correct array; trysortarray = 
"+trysortarray.toString());
+    }
+#else
+    // flash9 returns this instead, but I'm not sure why, maybe it compares the
+    // elements in a different order (or Haxe does)
+    if (trysortarray.toString() == "capitalization,alphabet,But,Different") {
+        DejaGnu.pass("custom sort returned correct array");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort did not return"+
+                     " correct array; trysortarray = 
"+trysortarray.toString());
+    }
+#end
     
     var testCmpBogus2 = function (x,y) {return 1;}
     trysortarray.sort( testCmpBogus2 );
@@ -2075,14 +2085,14 @@
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice() with no args does not 
return same array");
     }
     //check_equals ( typeof(spliced), "undefined" );
-    if (Std.string(untyped __typeof__(spliced)) == "undefined") {
+    if (untyped __typeof__(spliced) == "undefined") {
         DejaGnu.pass("splice() returns undefined");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice() does not return 
undefined");
     }
 
     // Zero and positive offset starts from the end (-1 is last)
-    spliced = ary.splice(0, 1);
+    var spliced = ary.splice(0, 1);
     //check_equals ( ary.toString(), "1,2,3,4,5" );
     if (ary.toString() == "1,2,3,4,5") {
         DejaGnu.pass("ary[0] element removed");
@@ -2228,60 +2238,121 @@
     }
 
     // Negative length are invalid
-    spliced = ary.splice(0, -1);
+    var spliced = ary.splice(0, -1);
     //check_equals ( typeof(spliced), 'undefined' );
-    if (Std.string(untyped __typeof__(spliced)) == "undefined") {
+#if !flash9
+    if (untyped __typeof__(spliced) == "undefined") {
         DejaGnu.pass("splice(0,-1) returns undefined");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice(0,-1) does not return 
undefined");
     }
+#else
+    DejaGnu.unresolved("It is possible that for the following splice tests 
for"+
+            " flash9, flash is in fact returning an empty array, but it is"+
+            " also possible that this is something HaXe is doing on its own");
+    if ( Std.is(spliced, Array) && spliced.toString() == "" 
+         && spliced.length == 0) {
+        DejaGnu.pass("splice(0,-1) (negative length) returned empty array");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"]splice(0,-1), (negative length)"+
+                     " did not return empty array; spliced = " + spliced);
+    }
+#end
     //check_equals ( ary.toString(), "2,3,4,5,6" );
     if (ary.toString() == "2,3,4,5,6") {
         DejaGnu.pass("negative length did not change ary");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] negative length changed ary");
     }
-    spliced = ary.splice(3, -1);
+    
+    var spliced = ary.splice(3, -1);
+#if !flash9
     //check_equals ( typeof(spliced), 'undefined' );
-    if (Std.string(untyped __typeof__(spliced)) == "undefined") {
+    if (untyped __typeof__(spliced) == "undefined") {
         DejaGnu.pass("splice(-3,-1,) returns undefined");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice(-3,-1,) does not return 
undefined");
     }
+#else
+    if ( Std.is(spliced, Array) && spliced.toString() == "" 
+         && spliced.length == 0) {
+        DejaGnu.pass("splice(3,-1) (negative length) returned empty array");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"]splice(3,-1), (negative length)"+
+                     " did not return empty array; spliced = " + spliced);
+    }
+#end
     //check_equals ( ary.toString(), "2,3,4,5,6" );
     if (ary.toString() == "2,3,4,5,6") {
         DejaGnu.pass("negative length did not change ary");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] negative length changed ary");
     }
-    spliced = ary.splice(-1, -1);
+    
+    var spliced = ary.splice(-1, -1);
+#if !flash9
     //check_equals ( typeof(spliced), 'undefined' );
     if (Std.string(untyped __typeof__(spliced)) == "undefined") {
         DejaGnu.pass("splice(-1,-1) returns undefined");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice(-1,-1) does not return 
undefined");
     }
+#else
+    if ( Std.is(spliced, Array) && spliced.toString() == "" 
+         && spliced.length == 0) {
+        DejaGnu.pass("splice(-1,-1) (negative length) returned empty array");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"]splice(-1,-1), (negative 
length)"+
+                     " did not return empty array; spliced = " + spliced);
+    }
+#end
     //check_equals ( ary.toString(), "2,3,4,5,6" );
     if (ary.toString() == "2,3,4,5,6") {
         DejaGnu.pass("negative length did not change ary");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] negative length changed ary");
     }
+    
     //spliced = ary.splice(-1, -1, "a", "b", "c");
-    spliced == Reflect.callMethod( ary, Reflect.field(ary, "splice"),
+    var spliced = Reflect.callMethod( ary, Reflect.field(ary, "splice"),
                                   [-1,-1,"a","b","c"]);
+#if !flash9
     //check_equals ( typeof(spliced), 'undefined' );
     if (Std.string(untyped __typeof__(spliced)) == "undefined") {
         DejaGnu.pass("splice(-1,-1,'a','b','c') returns undefined");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] splice(-1,-1,'a','b','c') does 
not return undefined");
     }
+#else
+    if ( Std.is(spliced, Array) && spliced.toString() == "" 
+         && spliced.length == 0) {
+        DejaGnu.pass("splice(-1,-1) negative length returned empty array");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"]splice(-1,-1), negative length"+
+                     " did not return empty array; spliced = " + spliced);
+    }
+#end
+
+#if !flash9
     //check_equals ( ary.toString(), "2,3,4,5,6" );
     if (ary.toString() == "2,3,4,5,6") {
         DejaGnu.pass("negative length did not change ary");
     } else {
         DejaGnu.fail("[ln:"+here.lineNumber+"] negative length changed ary");
     }
+#else
+    //NOTE: flash9 seems to insert elements into the array even thought the 
call
+    //  to splice was invalid. Is this a flash9 behavior or a HaXe problem?
+    if (ary.toString() == "2,3,4,5,a,b,c,6") {
+        DejaGnu.pass("In flash9, invalid call to splice(-1,-1,'a','b','c')"+
+                     " inserts elements into ary anyway");
+    } else {
+        DejaGnu.fail("[ln:"+here.lineNumber+"]ary changed. Invalid call to"+
+                     " splice(-1,-1,'a','b','c') did not insert elements into"+
+                     " the array");
+    }
+#end
+    
     // NOTE: resetting ary because flash 9 makes changes here which invalidate 
     //       further tests.
     ary = new Array();
@@ -2289,7 +2360,7 @@
 
     // Provide substitutions now
     //spliced = ary.splice(1, 1, "a", "b", "c");
-    spliced = Reflect.callMethod( ary, Reflect.field(ary, "splice"),
+    var spliced = Reflect.callMethod( ary, Reflect.field(ary, "splice"),
                                   [1,1,"a","b","c"]);
     //check_equals ( ary.toString(), "2,a,b,c,4,5,6" );
     if (ary.toString() == "2,a,b,c,4,5,6") {
@@ -2401,7 +2472,7 @@
         DejaGnu.fail("[ln:"+here.lineNumber+"] sparse array has more or less 
than 2 elements");
     }
 
-    spliced = ary.splice(3, 0); // no op ?
+    var spliced = ary.splice(3, 0); // no op ?
     //check_equals(ary.length, 8); // no change in length
     if (ary.length == 8) {
         DejaGnu.pass("splice(3,0) does not change length of sparse array");
@@ -2418,11 +2489,12 @@
         i++;
     }
     //check_equals(count, 8); // but fills the gaps !
-    //NOTE: is this correct behavior?
+    //NOTE: is this correct behavior? works differently in flash 9
     if (count == 8) {
         DejaGnu.pass("splice fills holes in sparse array");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] splice does not fill holes in 
sparse array");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] splice does not fill holes in"+
+                     " sparse array; count = "+ count);
     }
 
     ary = new Array(); ary[2] = 2; ary[7] = 7;
@@ -2448,7 +2520,8 @@
     if (count == 9) {
         DejaGnu.pass("splice fills holes in sparse array");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] splice does not fill holes in 
sparse array");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] splice does not fill holes in"+
+                     " sparse array; count = "+ count);
     }
     //check_equals(ary[3], 3);
     if (ary[3] == 3) {
@@ -2465,7 +2538,7 @@
 
     ary = new Array(); ary[2] = 2; ary[7] = 7;
     //spliced = ary.splice(3, 1, 3); // replace index 3 (an hole) with a 3 
value
-    spliced = Reflect.callMethod( ary, Reflect.field(ary, "splice"), [3,1,3]);
+    var spliced = Reflect.callMethod( ary, Reflect.field(ary, "splice"), 
[3,1,3]);
     //count=0; for (var i in ary) count++;
     count = 0;
     i = 0;
@@ -2923,13 +2996,15 @@
     if (r.toString() == "8,5,3,1,0,-2,-7,-9") {
         DejaGnu.pass("custom sort 'zero' returns correct array");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'zero' does not 
return correctly");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'zero' does not"+
+                     " return correctly; r = "+ r.toString());
     }
     //check_equals( b.toString(), "8,5,3,1,0,-2,-7,-9" );
     if (b.toString() == "8,5,3,1,0,-2,-7,-9") {
         DejaGnu.pass("custom sort 'zero' sorted b correctly");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'zero' did not sort 
b correctly");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'zero' did not 
sort"+
+                     " b correctly; b = "+ b.toString());
     }
     //b.sort( numeric );
     #if !flash9
@@ -2941,7 +3016,8 @@
     if (b.toString() == "8,5,3,1,0,-2,-7,-9") {
         DejaGnu.pass("custom sort 'numeric' sorted b correctly");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'numeric' did not 
sort b correctly");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'numeric' did not"+
+                     " sort b correctly; b = "+ b.toString());
     }
     //b.sort( numericRev );
     #if !flash9
@@ -2953,7 +3029,8 @@
     if (b.toString() == "8,5,3,1,0,-2,-7,-9") {
         DejaGnu.pass("custom sort 'numericRev' sorted b correctly");
     } else {
-        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'numericRev' did 
not sort b correctly");
+        DejaGnu.fail("[ln:"+here.lineNumber+"] custom sort 'numericRev' did"+
+                     " not sort b correctly; b = "+ b.toString());
     }
     
     // resetting order of b so that it is in the expected order for the
@@ -5042,107 +5119,109 @@
        // pop an array with delete-protected elements
        //--------------------------------------------------------
        static public function popProtected_Test() {
-       DejaGnu.note("*** Begin testing pop on delete protected array");
-       
-       
-       //~ a = new Array();
-       var a = new Array();
-       //~ a[0] = 'zero';
-       a[0] = 'zero';
-       //~ a[1] = 'one';
-       a[1] = 'one';
-       //~ ASSetPropFlags(a, "0", 7, 0); // protect 0 from deletion
-       untyped 'ASSetPropFlags'(a, "0", 7, 0);
-       //~ check_equals(a.length, 2);
-       if (a.length == 2) {
-               DejaGnu.pass("a.length == 2");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
-       }
-       //~ f = a.shift();
-       var f = a.shift();
-       //~ check_equals(a.length, 1);
-       if (a.length == 1) {
-               DejaGnu.pass("a.length == 1");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
-       }
-       //~ check_equals(f, 'zero');
-       if (f == 'zero') {
-               DejaGnu.pass("f == 'zero'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
-       }
-       //~ xcheck_equals(a[0], 'zero'); // could not delete for override
-       if (a[0] == 'zero') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'zero'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] != 'zero'");
-       }
-       //~ check_equals(typeof(a[1]), 'undefined');
-       if (Type.typeof(a[1]) == ValueType.TNull) {
-               DejaGnu.pass("Type of a[1] is 'undefined'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[1] is not 
'undefined'");
-       }
-
-       //~ check(!a.hasOwnProperty(1));
-       if ( !(untyped a.hasOwnProperty(1))) {
-               DejaGnu.pass("a no longer has property '1'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a still has property 
'1'");
-       }
-
-       a = new Array();
-       a[0] = 'zero';
-       a[1] = 'one';
-       //~ ASSetPropFlags(a, "1", 7, 0); // protect 1 from deletion
-       untyped 'ASSetPropFlags'(a, "1", 7, 0);
-       //~ check_equals(a.length, 2);
-       if (a.length == 2) {
-               DejaGnu.pass("a.length == 2");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
-       }
-       //~ f = a.shift();
-       f = a.shift();
-       //~ check_equals(a.length, 1);
-       if (a.length == 1) {
-               DejaGnu.pass("a.length == 1");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
-       }
-       //~ check_equals(f, 'zero');
-       if (f == 'zero') {
-               DejaGnu.pass("f == 'zero'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
-       }
-       //~ check_equals(a[0], 'one'); // could replace
-       if (a[0] == 'one') {
-               DejaGnu.pass("a[0] == 1");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 1");
-       }
-       //~ xcheck_equals(a[1], 'one'); // couldn't delete
-       if (a[1] == 'one') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] a[1] == 1");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a[1] != 1");
-       }
-       //~ check(a.hasOwnProperty(0)); 
-       if (untyped a.hasOwnProperty(0)) {
-               DejaGnu.pass("a still has the property '0'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has the 
property '0'");
-       }
-       //~ xcheck(a.hasOwnProperty(1)); 
-       if (untyped a.hasOwnProperty(1)) {
-               DejaGnu.xpass("a still has the property '1'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a no longer has the 
property '1'");
-       }
-       
+        DejaGnu.note("*** Begin testing pop on delete protected array");
+       
+       
+        //~ a = new Array();
+        var a = new Array();
+        //~ a[0] = 'zero';
+        a[0] = 'zero';
+        //~ a[1] = 'one';
+        a[1] = 'one';
+#if !flash9
+        // Undocumented AS2 function?
+        //~ ASSetPropFlags(a, "0", 7, 0); // protect 0 from deletion
+        untyped ASSetPropFlags(a, "0", 7, 0);
+        //~ check_equals(a.length, 2);
+        if (a.length == 2) {
+            DejaGnu.pass("a.length == 2");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
+        }
+        //~ f = a.shift();
+        var f = a.shift();
+        //~ check_equals(a.length, 1);
+        if (a.length == 1) {
+            DejaGnu.pass("a.length == 1");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
+        }
+        //~ check_equals(f, 'zero');
+        if (f == 'zero') {
+            DejaGnu.pass("f == 'zero'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
+        }
+        //~ xcheck_equals(a[0], 'zero'); // could not delete for override
+        if (a[0] == 'zero') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'zero'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] != 'zero'");
+        }
+        //~ check_equals(typeof(a[1]), 'undefined');
+        if (Type.typeof(a[1]) == ValueType.TNull) {
+            DejaGnu.pass("Type of a[1] is 'undefined'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[1] is not 
'undefined'");
+        }
+
+        //~ check(!a.hasOwnProperty(1));
+        if ( !(untyped a.hasOwnProperty(1))) {
+            DejaGnu.pass("a no longer has property '1'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a still has property '1'");
+        }
+
+        a = new Array();
+        a[0] = 'zero';
+        a[1] = 'one';
+        //~ ASSetPropFlags(a, "1", 7, 0); // protect 1 from deletion
+        untyped ASSetPropFlags(a, "1", 7, 0);
+        //~ check_equals(a.length, 2);
+        if (a.length == 2) {
+            DejaGnu.pass("a.length == 2");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
+        }
+        //~ f = a.shift();
+        f = a.shift();
+        //~ check_equals(a.length, 1);
+        if (a.length == 1) {
+            DejaGnu.pass("a.length == 1");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
+        }
+        //~ check_equals(f, 'zero');
+        if (f == 'zero') {
+            DejaGnu.pass("f == 'zero'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
+        }
+        //~ check_equals(a[0], 'one'); // could replace
+        if (a[0] == 'one') {
+            DejaGnu.pass("a[0] == 1");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 1");
+        }
+        //~ xcheck_equals(a[1], 'one'); // couldn't delete
+        if (a[1] == 'one') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] a[1] == 1");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a[1] != 1");
+        }
+        //~ check(a.hasOwnProperty(0)); 
+        if (untyped a.hasOwnProperty(0)) {
+            DejaGnu.pass("a still has the property '0'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has the 
property '0'");
+        }
+        //~ xcheck(a.hasOwnProperty(1)); 
+        if (untyped a.hasOwnProperty(1)) {
+            DejaGnu.xpass("a still has the property '1'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a no longer has the 
property '1'");
+        }
+#end
        }//end popProtected_Test
        
        
@@ -5150,142 +5229,143 @@
        // pop an array with read-only elements
        //--------------------------------------------------------
        static public function popReadOnly_Test() {
-       DejaGnu.note("*** Begin testing pop on array with read-only elements");
-
-       var a = new Array();
-       a[0] = 'zero';
-       a[1] = 'one';
-       //ASSetPropFlags(a, "0", 4, 0); // protect 0 from override
-       untyped 'ASSetPropFlags'(a, "0", 4, 0);
-       //check_equals(a.length, 2);
-       if (a.length == 2) {
-               DejaGnu.pass("a.length == 2");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
-       }
-       
-       a[0] = 'overridden';
-       //xcheck_equals(a[0], 'zero'); // was protected..
-       if (a[0] == 'zero') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'zero'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] != 'zero'");
-       }
-       var f = a.shift();
-       //check_equals(a.length, 1); 
-       if (a.length == 1) {
-               DejaGnu.pass("a.length == 1");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
-       }
-       //xcheck_equals(f, 'zero');
-       if (f == 'zero') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] f == 'zero'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] f != 'zero'");
-       }
-       //check_equals(a[0], 'one'); // 0 was replaced anyway, didn't care 
about protection
-       if (a[0] == 'one') {
-               DejaGnu.pass("a[0] == 'one'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 'one'");
-       }
-       //check_equals(typeof(a[1]), 'undefined');
-       if (Type.typeof(a[1]) == ValueType.TNull) {
-               DejaGnu.pass("Type of a[1] is 'undefined'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[1] is not 
'undefined'");
-       }
-       a[0] = 'overridden';
-       //check_equals(a[0], 'overridden'); // flag was lost
-       if (a[0] == 'overridden') {
-               DejaGnu.pass("a[0] == 'overridden'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 'overridden'");
-       }
-       //check(!a.hasOwnProperty(1)); 
-       if ( !(untyped a.hasOwnProperty(1))) {
-               DejaGnu.pass("a no longer has the property '1'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a still has the property 
'1'");
-       }
-
-       a = new Array();
-       a[0] = 'zero';
-       a[1] = 'one';
-       a[2] = 'two';
-       //ASSetPropFlags(a, "1", 4, 0); // protect 1 from override
-       untyped 'ASSetPropFlags'(a, "1", 4, 0);
-       a[1] = 'overridden';
-       //xcheck_equals(a[1], 'one'); // was protected
-       if (a[1] == 'one') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] a[1] == 'one'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a[1] != 'one'");
-       }
-       //check_equals(a.length, 3);
-       if (a.length == 3) {
-               DejaGnu.pass("a.length == 3");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 3");
-       }
-       f = a.shift();
-       //check_equals(a.length, 2);
-       if (a.length == 2) {
-               DejaGnu.pass("a.length == 2");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
-       }
-       //check_equals(f, 'zero');
-       if (f == 'zero') {
-               DejaGnu.pass("f == 'zero'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
-       }
-       //xcheck_equals(a[0], 'one'); // 0 was replaced anyway, didn't care 
about protection
-       if (a[0] == 'one') {
-               DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'one'");
-       } else {
-               DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] == 'one'");
-       }
-       //check_equals(a[1], 'two');
-       if (a[1] == 'two') {
-               DejaGnu.pass("a[1] == 'two'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a[1] == 'two'");
-       }
-       //check_equals(typeof(a[2]), 'undefined');
-       if (Type.typeof(a[2]) == ValueType.TNull) {
-               DejaGnu.pass("Type of a[2] is 'undefined'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[2] is not 
'undefined'");
-       }
-       a[1] = 'overridden';
-       //check_equals(a[1], 'overridden'); // flag was lost
-       if (a[1] == 'overridden') {
-               DejaGnu.pass("a[1] == 'overridden'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a[1] != overridden");
-       }
-       //check(a.hasOwnProperty(0));
-       if (untyped a.hasOwnProperty(0)) {
-               DejaGnu.pass("a still has property '0'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has property 
'0'");
-       }
-       //check(a.hasOwnProperty(1)); 
-       if (untyped a.hasOwnProperty(1)) {
-               DejaGnu.pass("a still has property '1'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has property 
'1'");
-       }
-       //check(!a.hasOwnProperty(2)); 
-       if ( !(untyped a.hasOwnProperty(2))) {
-               DejaGnu.pass("a no longer has property '2'");
-       } else {
-               DejaGnu.fail("[ln:"+here.lineNumber+"] a still has property 
'2'");
-       }
-       
+        DejaGnu.note("*** Begin testing pop on array with read-only elements");
+
+        var a = new Array();
+        a[0] = 'zero';
+        a[1] = 'one';
+#if !flash9
+        //ASSetPropFlags(a, "0", 4, 0); // protect 0 from override
+        untyped ASSetPropFlags(a, "0", 4, 0);
+        //check_equals(a.length, 2);
+        if (a.length == 2) {
+            DejaGnu.pass("a.length == 2");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
+        }
+        
+        a[0] = 'overridden';
+        //xcheck_equals(a[0], 'zero'); // was protected..
+        if (a[0] == 'zero') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'zero'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] != 'zero'");
+        }
+        var f = a.shift();
+        //check_equals(a.length, 1); 
+        if (a.length == 1) {
+            DejaGnu.pass("a.length == 1");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 1");
+        }
+        //xcheck_equals(f, 'zero');
+        if (f == 'zero') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] f == 'zero'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] f != 'zero'");
+        }
+        //check_equals(a[0], 'one'); // 0 was replaced anyway, didn't care 
about protection
+        if (a[0] == 'one') {
+            DejaGnu.pass("a[0] == 'one'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 'one'");
+        }
+        //check_equals(typeof(a[1]), 'undefined');
+        if (Type.typeof(a[1]) == ValueType.TNull) {
+            DejaGnu.pass("Type of a[1] is 'undefined'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[1] is not 
'undefined'");
+        }
+        a[0] = 'overridden';
+        //check_equals(a[0], 'overridden'); // flag was lost
+        if (a[0] == 'overridden') {
+            DejaGnu.pass("a[0] == 'overridden'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a[0] != 'overridden'");
+        }
+        //check(!a.hasOwnProperty(1)); 
+        if ( !(untyped a.hasOwnProperty(1))) {
+            DejaGnu.pass("a no longer has the property '1'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a still has the property 
'1'");
+        }
+
+        a = new Array();
+        a[0] = 'zero';
+        a[1] = 'one';
+        a[2] = 'two';
+        //ASSetPropFlags(a, "1", 4, 0); // protect 1 from override
+        untyped ASSetPropFlags(a, "1", 4, 0);
+        a[1] = 'overridden';
+        //xcheck_equals(a[1], 'one'); // was protected
+        if (a[1] == 'one') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] a[1] == 'one'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a[1] != 'one'");
+        }
+        //check_equals(a.length, 3);
+        if (a.length == 3) {
+            DejaGnu.pass("a.length == 3");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 3");
+        }
+        f = a.shift();
+        //check_equals(a.length, 2);
+        if (a.length == 2) {
+            DejaGnu.pass("a.length == 2");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a.length != 2");
+        }
+        //check_equals(f, 'zero');
+        if (f == 'zero') {
+            DejaGnu.pass("f == 'zero'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] f != 'zero'");
+        }
+        //xcheck_equals(a[0], 'one'); // 0 was replaced anyway, didn't care 
about protection
+        if (a[0] == 'one') {
+            DejaGnu.xpass("[ln:"+here.lineNumber+"] a[0] == 'one'");
+        } else {
+            DejaGnu.xfail("[ln:"+here.lineNumber+"] a[0] == 'one'");
+        }
+        //check_equals(a[1], 'two');
+        if (a[1] == 'two') {
+            DejaGnu.pass("a[1] == 'two'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a[1] == 'two'");
+        }
+        //check_equals(typeof(a[2]), 'undefined');
+        if (Type.typeof(a[2]) == ValueType.TNull) {
+            DejaGnu.pass("Type of a[2] is 'undefined'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] Type of a[2] is not 
'undefined'");
+        }
+        a[1] = 'overridden';
+        //check_equals(a[1], 'overridden'); // flag was lost
+        if (a[1] == 'overridden') {
+            DejaGnu.pass("a[1] == 'overridden'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a[1] != overridden");
+        }
+        //check(a.hasOwnProperty(0));
+        if (untyped a.hasOwnProperty(0)) {
+            DejaGnu.pass("a still has property '0'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has property 
'0'");
+        }
+        //check(a.hasOwnProperty(1)); 
+        if (untyped a.hasOwnProperty(1)) {
+            DejaGnu.pass("a still has property '1'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a no longer has property 
'1'");
+        }
+        //check(!a.hasOwnProperty(2)); 
+        if ( !(untyped a.hasOwnProperty(2))) {
+            DejaGnu.pass("a no longer has property '2'");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"] a still has property '2'");
+        }
+#end
        }//end popReadOnly
        
 }//end class Array_as

=== modified file 'testsuite/misc-haxe.all/classes.all/display/BitmapData_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/display/BitmapData_as.hx      
2009-08-13 20:51:30 +0000
+++ b/testsuite/misc-haxe.all/classes.all/display/BitmapData_as.hx      
2009-08-13 22:25:04 +0000
@@ -923,9 +923,9 @@
         bmp = new BitmapData(10000, 3);
         //xcheck_equals(typeof(bmp), "undefined");
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(10000, 3) returned 'undefined'");
+            DejaGnu.pass("Ctor BitmapData(10000, 3) returned 'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(10000, 3) 
returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(10000, 3) 
returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined);
         if ( bmp.height == null) {
@@ -938,9 +938,9 @@
         bmp = new BitmapData(0, 10000);
         //xcheck_equals(typeof(bmp), "undefined");
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(0, 10000) returned 'undefined'");
+            DejaGnu.pass("Ctor BitmapData(0, 10000) returned 'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 10000) 
returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 10000) 
returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined);
         if ( bmp.height == null) {
@@ -953,9 +953,9 @@
         bmp = new BitmapData(2880, 2881);
         //xcheck_equals(typeof(bmp), "undefined");
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(2880, 2881) returned 'undefined'");
+            DejaGnu.pass("Ctor BitmapData(2880, 2881) returned 'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(2880, 2881) 
returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(2880, 2881) 
returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined);
         if ( bmp.height == null) {
@@ -968,9 +968,9 @@
         bmp = new BitmapData(0, 2880);
         //xcheck_equals(bmp, undefined);
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(0, 2880) returned 'undefined'");
+            DejaGnu.pass("Ctor BitmapData(0, 2880) returned 'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 2880) 
returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 2880) 
returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined);
         if ( bmp.height == null) {
@@ -983,9 +983,9 @@
         bmp = new BitmapData(0, 2879);
         //xcheck_equals(bmp, undefined);
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(0, 2879) returned 'undefined'");
+            DejaGnu.pass("Ctor BitmapData(0, 2879) returned 'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 2879) 
returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(0, 2879) 
returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined);
         if ( bmp.height == null) {
@@ -998,9 +998,9 @@
         bmp = new BitmapData(-1, 10, false, 0xff);
         //xcheck_equals(bmp, undefined);
         if (untyped __typeof__(bmp) == 'undefined') {
-            DejaGnu.xpass("Ctor BitmapData(-1, 10, false, 0xff) returned 
'undefined'");
+            DejaGnu.pass("Ctor BitmapData(-1, 10, false, 0xff) returned 
'undefined'");
         } else {
-            DejaGnu.xfail("[ln:"+here.lineNumber+"]Ctor BitmapData(-1, 10, 
false, 0xff) returned an object instead of 'undefined'");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]Ctor BitmapData(-1, 10, 
false, 0xff) returned an object instead of 'undefined'");
         }
         //check_equals(bmp.height, undefined)
         if ( bmp.height == null) {

=== modified file 
'testsuite/misc-haxe.all/classes.all/display/DisplayObject_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/display/DisplayObject_as.hx   
2009-08-13 20:51:30 +0000
+++ b/testsuite/misc-haxe.all/classes.all/display/DisplayObject_as.hx   
2009-08-14 02:20:48 +0000
@@ -52,195 +52,256 @@
         var l1:DisplayObject = new Loader();
         var r1:Rectangle = new Rectangle(1,1,1,1);
 
-        // Make sure we actually get a valid class        
+        // Make sure we actually get a valid class
+        if (untyped __typeof__(DisplayObject) == 'object') {
+          DejaGnu.pass("DisplayObject class exists");
+        } else {
+          DejaGnu.fail("DisplayObject class does not exist");
+        }
         if (Std.is(x1, DisplayObject)) {
-            DejaGnu.pass("DisplayObject class exists");
+            DejaGnu.pass("Shape correctly inherits DisplayObject");
         } else {
-            DejaGnu.fail("DisplayObject lass doesn't exist");
+            DejaGnu.fail("Shape does not correctly inherit DisplayObject");
         }
         
-// Tests to see if all the properties exist. All these do is test for
-// existance of a property, and don't test the functionality at all. This
-// is primarily useful only to test completeness of the API implementation.
-//Determine if the accessibilityProperties property of x1 exists by setting it 
and testing it
-        var accessProps:AccessibilityProperties = new 
AccessibilityProperties();
-               accessProps.name = "Test";
-               x1.accessibilityProperties = accessProps;
-        if (Std.is(x1.accessibilityProperties, AccessibilityProperties)) {
+        //---------------------------------------------------------------------
+        // Property Existence
+        //---------------------------------------------------------------------
+        DejaGnu.note("**** Property Existence testing ****");
+        if (untyped x1.hasOwnProperty('accessibilityProperties')) {
             DejaGnu.pass("DisplayObject::accessibilityProperties property 
exists");
         } else {
-            DejaGnu.fail("DisplayObject::accessibilityProperties property 
doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                         "]DisplayObject::accessibilityProperties property"+
+                         " doesn't exist");
         }
-        if (Type.typeof(x1.alpha) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('alpha')) {
             DejaGnu.pass("DisplayObject::alpha property exists");
         } else {
-            DejaGnu.fail("DisplayObject::alpha property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::alpha"+
+                         " property doesn't exist");
         }
-        if (Std.is(x1.blendMode, String)) {
+        if (untyped x1.hasOwnProperty('blendMode')) {
             DejaGnu.pass("DisplayObject::blendMode property exists");
         } else {
-            DejaGnu.fail("DisplayObject::blendMode property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::blendMode"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.cacheAsBitmap) == ValueType.TBool) {
+        if (untyped x1.hasOwnProperty('cacheAsBitmap')) {
             DejaGnu.pass("DisplayObject::cacheAsBitmap property exists");
         } else {
-            DejaGnu.fail("DisplayObject::cacheAsBitmap property doesn't 
exist");
+            
DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::cacheAsBitmap"+
+                         " property doesn't exist");
         }
-        if (Std.is(x1.filters, Array)) {
+        if (untyped x1.hasOwnProperty('filters')) {
             DejaGnu.pass("DisplayObject::filters property exists");
         } else {
-            DejaGnu.fail("DisplayObject::filters property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::filters"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.height) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('height')) {
             DejaGnu.pass("DisplayObject::height property exists");
         } else {
-            DejaGnu.fail("DisplayObject::height property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::height"+
+                         " property doesn't exist");
+        }
+        if (untyped x1.hasOwnProperty('loaderInfo')) {
+            DejaGnu.pass("DisplayObject::loaderInfo property exists");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::loaderInfo"+
+                         " property does not exist");
         }
     //Determine if the mask property of x1 exists by setting it and testing it
-            var m1:Sprite = new Sprite();
-            x1.mask = m1;
-        if (Std.is(x1.mask, DisplayObject)) {
+        if (untyped x1.hasOwnProperty('mask')) {
             DejaGnu.pass("DisplayObject::mask property exists");
         } else {
-            DejaGnu.fail("DisplayObject::mask property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::mask 
property"+
+                         " does not exist");
         }
-//Determine if the loaderInfo property of x1 exists by setting it and testing 
it
-//     var urlRequest:URLRequest = new URLRequest("../classes.all/TEST.jpg");
-//     loader.load(urlRequest);
-//     if (Std.is(x1.loaderInfo, LoaderInfo)) {
-//         DejaGnu.pass("DisplayObject::loaderInfo property exists");
-//     } else {
-//         DejaGnu.fail("DisplayObject::loaderInfo property doesn't exist");
-//     }
-        if (Type.typeof(x1.mouseX) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('mouseX')) {
             DejaGnu.pass("DisplayObject::mouseX property exists");
         } else {
-            DejaGnu.fail("DisplayObject::mouseX property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::mouseX"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.mouseY) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('mouseY')) {
             DejaGnu.pass("DisplayObject::mouseY property exists");
         } else {
-            DejaGnu.fail("DisplayObject::mouseY property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::mouseY"+
+                         " property doesn't exist");
         }
-        if (Std.is(x1.name, String)) {
+        if (untyped x1.hasOwnProperty('name')) {
             DejaGnu.pass("DisplayObject::name property exists");
         } else {
-            DejaGnu.fail("DisplayObject::name property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::name 
property"+
+                         " doesn't exist");
         }
-        if (Type.typeof(x1.opaqueBackground) == ValueType.TNull) {
+        if (untyped x1.hasOwnProperty('opaqueBackground')) {
             DejaGnu.pass("DisplayObject::opaqueBackground property exists");
         } else {
-            DejaGnu.fail("DisplayObject::opaqueBackground property doesn't 
exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                         "]DisplayObject::opaqueBackground property doesn't"+
+                         " exist");
         }
-//Determine if the parent property of x1 exists by setting it and testing it
-        m1.addChild(x1);
-        if (Std.is(x1.parent, DisplayObjectContainer)) {
+        if (untyped x1.hasOwnProperty('parent')) {
             DejaGnu.pass("DisplayObject::parent property exists");
         } else {
-            DejaGnu.fail("DisplayObject::parent property doesn't exist");
-        }
-        m1.addChild(l1);
-//Determine if the stage property of x1 exists by setting it and testing it
-        flash.Lib.current.stage.addChild(x1);
-        if (Std.is(x1.stage, Stage)) {
-            DejaGnu.pass("DisplayObject::stage property exists");
-        } else {
-            DejaGnu.fail("DisplayObject::stage property doesn't exist");
-        }
-        if (Std.is(l1.root, DisplayObject)) {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::parent"+
+                         " property does not exist");
+        }
+        if (untyped x1.hasOwnProperty('root')) {
             DejaGnu.pass("DisplayObject::root property exists");
         } else {
-            DejaGnu.fail("DisplayObject::root property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::root 
property"+
+                         " doesn't exist");
         }
-        DejaGnu.note("Type of l1.root is "+Type.typeof(l1.root));
-        if (Type.typeof(x1.rotation) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('rotation')) {
             DejaGnu.pass("DisplayObject::rotation property exists");
         } else {
-            DejaGnu.fail("DisplayObject::rotation property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::rotation"+
+                         " property doesn't exist");
         }
-//Determine if the scale9Grid property of x1 exists by setting it and testing 
it
-        x1.graphics.drawRect(0,0,10,10);
-        x1.scale9Grid = r1;
-        if (Std.is(x1.scale9Grid, Rectangle)) {
+        if (untyped x1.hasOwnProperty('scale9Grid')) {
             DejaGnu.pass("DisplayObject::scale9Grid property exists");
         } else {
-            DejaGnu.fail("DisplayObject::scale9Grid property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::scale9Grid"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.scaleX) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('scaleX')) {
             DejaGnu.pass("DisplayObject::scaleX property exists");
         } else {
-            DejaGnu.fail("DisplayObject::scaleX property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::scaleX"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.scaleY) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('scaleY')) {
             DejaGnu.pass("DisplayObject::scaleY property exists");
         } else {
-            DejaGnu.fail("DisplayObject::scaleY property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::scaleY"+
+                         " property doesn't exist");
         }
-//Determine if the scrollRect property of x1 exists by setting it and testing 
it
-        x1.scrollRect = r1;
-        if (Std.is(x1.scrollRect, Rectangle)) {
+        if (untyped x1.hasOwnProperty('scrollRect')) {
             DejaGnu.pass("DisplayObject::scrollRect property exists");
         } else {
-            DejaGnu.fail("DisplayObject::scrollRect property doesn't exist"); 
-        }
-        if (Std.is(x1.transform, Transform)) {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::scrollRect"+
+                         " property doesn't exist"); 
+        }
+        if (untyped x1.hasOwnProperty('stage')) {
+            DejaGnu.pass("DisplayObject::stage property exists");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::stage"+
+                         "property doesn't exist");
+        }
+        if (untyped x1.hasOwnProperty('transform')) {
             DejaGnu.pass("DisplayObject::transform property exists");
         } else {
-            DejaGnu.fail("DisplayObject::transform property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::transform"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.visible) == ValueType.TBool) {
+        if (untyped x1.hasOwnProperty('visible')) {
             DejaGnu.pass("DisplayObject::visible property exists");
         } else {
-            DejaGnu.fail("DisplayObject::visible property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::visible"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.width) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('width')) {
             DejaGnu.pass("DisplayObject::width property exists");
         } else {
-            DejaGnu.fail("DisplayObject::width property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::width"+
+                         " property doesn't exist");
         }
-        if (Type.typeof(x1.x) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('x')) {
             DejaGnu.pass("DisplayObject::x property exists");
         } else {
-            DejaGnu.fail("DisplayObject::x property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::x property"+
+                         " doesn't exist");
         }
-        if (Type.typeof(x1.y) == ValueType.TFloat) {
+        if (untyped x1.hasOwnProperty('y')) {
             DejaGnu.pass("DisplayObject::y property exists");
         } else {
-            DejaGnu.fail("DisplayObject::y property doesn't exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::y property"+
+                         " doesn't exist");
         }
 
 // Tests to see if all the methods exist. All these do is test for
 // existance of a method, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-        if (Type.typeof(x1.getBounds) == ValueType.TFunction) {
+        
//----------------------------------------------------------------------
+        // Method Existence
+        
//----------------------------------------------------------------------
+        if (untyped x1.hasOwnProperty('getBounds')) {
             DejaGnu.pass("DisplayObject::getBounds() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::getBounds() method doesn't exist");
-        }
-        if (Type.typeof(x1.getRect) == ValueType.TFunction) {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::getBounds()"+
+                         " method doesn't exist");
+        }
+        if (untyped __typeof__(x1.getBounds) == 'function') {
+            DejaGnu.pass("getBounds() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]getBounds() is not a 
function");
+        }
+        
+        if (untyped x1.hasOwnProperty('getRect')) {
             DejaGnu.pass("DisplayObject::getRect() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::getRect() method doesn't exist");
-        }
-        if (Type.typeof(x1.globalToLocal) == ValueType.TFunction) {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]DisplayObject::getRect()"+
+                         " method doesn't exist");
+        }
+        if (untyped __typeof__(x1.getRect) == 'function') {
+            DejaGnu.pass("getRect() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]getRect() is not a 
function");
+        }
+        
+        if (untyped x1.hasOwnProperty('globalToLocal')) {
             DejaGnu.pass("DisplayObject::globalToLocal() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::globalToLocal() method doesn't 
exist");
-        }
-        if (Type.typeof(x1.hitTestObject) == ValueType.TFunction) {
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                        "]DisplayObject::globalToLocal() method doesn't 
exist");
+        }
+        if (untyped __typeof__(x1.globalToLocal) == 'function') {
+            DejaGnu.pass("globalToLocal() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]globalToLocal() is not a"+
+                         " function");
+        }
+
+        if (untyped x1.hasOwnProperty('hitTestObject')) {
             DejaGnu.pass("DisplayObject::hitTestObject() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::hitTestObject() method doesn't 
exist");
-        }
-        if (Type.typeof(x1.hitTestPoint) == ValueType.TFunction) {
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                        "]DisplayObject::hitTestObject() method doesn't 
exist");
+        }
+        if (untyped __typeof__(x1.hitTestObject) == 'function') {
+            DejaGnu.pass("hitTestObject() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]hitTestObject() is not a"+
+                         " function");
+        }
+        
+        if (untyped x1.hasOwnProperty('hitTestPoint')) {
             DejaGnu.pass("DisplayObject::hitTestPoint() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::hitTestPoint() method doesn't exist");
-        }
-        if (Type.typeof(x1.localToGlobal) == ValueType.TFunction) {
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                         "]DisplayObject::hitTestPoint() method doesn't 
exist");
+        }
+        if (untyped __typeof__(x1.hitTestPoint) == 'function') {
+            DejaGnu.pass("hitTestPoint() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]hitTestPoint() is not a"+
+                         " function");
+        }
+        
+        if (untyped x1.hasOwnProperty('localToGlobal')) {
             DejaGnu.pass("DisplayObject::localToGlobal() method exists");
         } else {
-            DejaGnu.fail("DisplayObject::localToGlobal() method doesn't 
exist");
+            DejaGnu.fail("[ln:"+here.lineNumber+
+                        "]DisplayObject::localToGlobal() method doesn't 
exist");
+        }
+        if (untyped __typeof__(x1.localToGlobal) == 'function') {
+            DejaGnu.pass("localToGlobal() is a function");
+        } else {
+            DejaGnu.fail("[ln:"+here.lineNumber+"]localToGlobal() is not a"+
+                         " function");
         }
 #else
         DejaGnu.note("Display Object did not exist in versions prior to SWF 
9");


reply via email to

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