gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10987: Modified Test Cases


From: Sharad Desai
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10987: Modified Test Cases
Date: Wed, 03 Jun 2009 11:58:28 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 10987
committer: Sharad Desai <address@hidden>
branch nick: trunk
timestamp: Wed 2009-06-03 11:58:28 -0600
message:
  Modified Test Cases
modified:
  testsuite/as3/classes.all/display/JointStyle_as.hx
  testsuite/as3/classes.all/display/LineScaleMode_as.hx
  testsuite/as3/classes.all/display/PixelSnapping_as.hx
  testsuite/as3/classes.all/display/SpreadMethod_as.hx
  testsuite/as3/classes.all/display/StageAlign_as.hx
  testsuite/as3/classes.all/display/StageDisplayState_as.hx
  testsuite/as3/classes.all/display/StageQuality_as.hx
  testsuite/as3/classes.all/display/StageScaleMode_as.hx
  testsuite/as3/classes.all/text/StyleSheet_as.hx
  testsuite/as3/classes.all/text/TextFieldAutoSize_as.hx
  testsuite/as3/classes.all/text/TextFieldType_as.hx
  testsuite/as3/classes.all/utils/Proxy_as.hx
  testsuite/as3/classes.all/xml/XMLDocument_as.hx
  testsuite/as3/classes.all/xml/XMLNodeType_as.hx
  testsuite/as3/classes.all/xml/XMLNode_as.hx
=== modified file 'testsuite/as3/classes.all/display/JointStyle_as.hx'
--- a/testsuite/as3/classes.all/display/JointStyle_as.hx        2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/JointStyle_as.hx        2009-06-03 
17:58:28 +0000
@@ -40,18 +40,25 @@
     static function main() {
 
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(JointStyle)==TObject) {
+           DejaGnu.pass("JointStyle class exists.");
+       } else {
+           DejaGnu.fail("JointStyle class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
         if (Type.typeof(JointStyle.BEVEL)!= null) {
             DejaGnu.pass("JointStyle.BEVEL constant exists");
         } else {
             DejaGnu.fail("JointStyle .BEVEL constant doesn't exist");
         }
-
         if (Type.typeof(JointStyle.MITER)!= null) {
             DejaGnu.pass("JointStyle.MITER constant exists");
         } else {
             DejaGnu.fail("JointStyle.MITER constant doesn't exist");
         }
-
         if (Type.typeof(JointStyle.ROUND)!= null) {
             DejaGnu.pass("JointStyle.ROUND constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/LineScaleMode_as.hx'
--- a/testsuite/as3/classes.all/display/LineScaleMode_as.hx     2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/LineScaleMode_as.hx     2009-06-03 
17:58:28 +0000
@@ -40,6 +40,15 @@
     static function main() {
 
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(LineScaleMode)==TObject) {
+           DejaGnu.pass("LineScaleMode class exists.");
+       } else {
+           DejaGnu.fail("LineScaleMode class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
         if (Type.typeof(LineScaleMode.HORIZONTAL)!= TNull) {
             DejaGnu.pass("LineScaleMode.HORIZONTAL constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/PixelSnapping_as.hx'
--- a/testsuite/as3/classes.all/display/PixelSnapping_as.hx     2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/PixelSnapping_as.hx     2009-06-03 
17:58:28 +0000
@@ -40,10 +40,16 @@
 class PixelSnapping_as {
     static function main() {
 
-// 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.
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(PixelSnapping)==TObject) {
+           DejaGnu.pass("PixelSnapping class exists.");
+       } else {
+           DejaGnu.fail("PixelSnapping class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
        if (Type.typeof(PixelSnapping.ALWAYS) != TNull) {
             DejaGnu.pass("PixelSnapping.ALWAYS constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/SpreadMethod_as.hx'
--- a/testsuite/as3/classes.all/display/SpreadMethod_as.hx      2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/SpreadMethod_as.hx      2009-06-03 
17:58:28 +0000
@@ -39,10 +39,16 @@
 class SpreadMethod_as {
     static function main() {
 
-// 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.
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(SpreadMethod)==TObject) {
+           DejaGnu.pass("SpreadMethod class exists.");
+       } else {
+           DejaGnu.fail("SpreadMethod class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
         if (Type.typeof(SpreadMethod.PAD)!= null) {
             DejaGnu.pass("SpreadMethod.PAD constantexists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/StageAlign_as.hx'
--- a/testsuite/as3/classes.all/display/StageAlign_as.hx        2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/StageAlign_as.hx        2009-06-03 
17:58:28 +0000
@@ -40,10 +40,16 @@
 class StageAlign_as {
     static function main() {
 
-// 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.
        #if flash9    
+       // Make sure we actually get a valid class        
+       if (Type.typeof(StageAlign)==TObject) {
+           DejaGnu.pass("StageAlign class exists.");
+       } else {
+           DejaGnu.fail("StageAlign class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
        if (Type.typeof(StageAlign.BOTTOM)!=TNull) {    
             DejaGnu.pass("StageAlign.BOTTOM constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/StageDisplayState_as.hx'
--- a/testsuite/as3/classes.all/display/StageDisplayState_as.hx 2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/StageDisplayState_as.hx 2009-06-03 
17:58:28 +0000
@@ -38,18 +38,27 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class StageDisplayState_as {
     static function main() {
-
-       // 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 flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(StageDisplayState)==TObject) {
+           DejaGnu.pass("StageDisplayState class exists.");
+       } else {
+           DejaGnu.fail("StageDisplayState class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
        if (Type.typeof(StageDisplayState.FULL_SCREEN)!=TNull) {     
             DejaGnu.pass("StageDisplayState.FULL_SCREEN constant exists");
         } else {
             DejaGnu.fail("StageDisplayState.FULL_SCREEN constant doesn't 
exist");
         }
-
+       if (Type.typeof(StageDisplayState.NORMAL)!=TNull) {
+            DejaGnu.pass("StageDisplayState.NORMAL constant exists");
+        } else {
+            DejaGnu.fail("StageDisplayState.NORMAL constant doesn't exist");
+        }
        // This constant is AIR only
        //         if 
(Type.typeof(StageDisplayState.FULL_SCREEN_INTERACTIVE)!=TNull) {
        //             DejaGnu.pass("StageDisplayState.FULL_SCREEN_INTERACTIVE 
constant exists");
@@ -57,12 +66,6 @@
        //             DejaGnu.fail("StageDisplayState.FULL_SCREEN_INTERACTIVE 
constant doesn't exist");
        //         }
 
-       if (Type.typeof(StageDisplayState.NORMAL)!=TNull) {
-            DejaGnu.pass("StageDisplayState.NORMAL constant exists");
-        } else {
-            DejaGnu.fail("StageDisplayState.NORMAL constant doesn't exist");
-        }
-
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
        #end

=== modified file 'testsuite/as3/classes.all/display/StageQuality_as.hx'
--- a/testsuite/as3/classes.all/display/StageQuality_as.hx      2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/StageQuality_as.hx      2009-06-03 
17:58:28 +0000
@@ -39,28 +39,31 @@
 class StageQuality_as {
     static function main() {
 
-// 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.
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(StageQuality)==TObject) {
+           DejaGnu.pass("StageQuality class exists.");
+       } else {
+           DejaGnu.fail("StageQuality class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
         if (Type.typeof(StageQuality.BEST)!= null) {
             DejaGnu.pass("StageQuality.BEST constant exists");
         } else {
             DejaGnu.fail("StageQuality.BEST constant doesn't exist");
         }
-
         if (Type.typeof(StageQuality.HIGH)!= null) {
             DejaGnu.pass("StageQuality.HIGH constant exists");
         } else {
             DejaGnu.fail("StageQuality.HIGH constant doesn't exist");
         }
-
         if (Type.typeof(StageQuality.LOW)!= null) {
             DejaGnu.pass("StageQuality.LOW constant exists");
         } else {
             DejaGnu.fail("StageQuality.LOW constant doesn't exist");
         }
-
         if (Type.typeof(StageQuality.MEDIUM)!= null) {
             DejaGnu.pass("StageQuality.MEDIUM constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/display/StageScaleMode_as.hx'
--- a/testsuite/as3/classes.all/display/StageScaleMode_as.hx    2009-06-02 
02:08:31 +0000
+++ b/testsuite/as3/classes.all/display/StageScaleMode_as.hx    2009-06-03 
17:58:28 +0000
@@ -39,10 +39,16 @@
 class StageScaleMode_as {
     static function main() {
 
-// 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.
        #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(StageScaleMode)==TObject) {
+           DejaGnu.pass("StageScaleMode class exists.");
+       } else {
+           DejaGnu.fail("StageScaleMode class doesn't exist");
+       }
+
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
         if (Type.typeof(StageScaleMode.EXACT_FIT)!= null) {
             DejaGnu.pass("StageScaleMode.EXACT_FIT constant exists");
         } else {

=== modified file 'testsuite/as3/classes.all/text/StyleSheet_as.hx'
--- a/testsuite/as3/classes.all/text/StyleSheet_as.hx   2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/text/StyleSheet_as.hx   2009-06-03 17:58:28 
+0000
@@ -27,11 +27,11 @@
 import flash.text.StyleSheet;
 import flash.display.MovieClip;
 #else
-import flash.StyleSheet;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,6 +39,7 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class StyleSheet_as {
     static function main() {
+       #if flash9
         var x1:StyleSheet = new StyleSheet();
 
         // Make sure we actually get a valid class        
@@ -47,51 +48,50 @@
         } else {
             DejaGnu.fail("StyleSheet class doesn't exist");
         }
-// 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.
-       if (x1.styleNames == 0) {
+       // 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.
+       if (Std.is(x1.styleNames, Dynamic)) {
            DejaGnu.pass("StyleSheet.styleNames property exists");
        } else {
            DejaGnu.fail("StyleSheet.styleNames 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 (x1.StyleSheet == StyleSheet) {
-           DejaGnu.pass("StyleSheet::StyleSheet() method exists");
-       } else {
-           DejaGnu.fail("StyleSheet::StyleSheet() method doesn't exist");
-       }
-       if (x1.clear == null) {
+       // 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.getStyle)==ValueType.TFunction) {
+           DejaGnu.pass("StyleSheet::getStyle() method exists");
+       } else {
+           DejaGnu.fail("StyleSheet::getStyle() method doesn't exist");
+       }
+       if (Type.typeof(x1.setStyle)==ValueType.TFunction) {
+           DejaGnu.pass("StyleSheet::setStyle() method exists");
+       } else {
+           DejaGnu.fail("StyleSheet::setStyle() method doesn't exist");
+       }
+       if (Type.typeof(x1.clear)==ValueType.TFunction) {
            DejaGnu.pass("StyleSheet::clear() method exists");
        } else {
            DejaGnu.fail("StyleSheet::clear() method doesn't exist");
        }
-       if (x1.getStyle == Object) {
-           DejaGnu.pass("StyleSheet::getStyle() method exists");
-       } else {
-           DejaGnu.fail("StyleSheet::getStyle() method doesn't exist");
-       }
-       if (x1.parseCSS == null) {
+       
+       if (Type.typeof(x1.parseCSS)==ValueType.TFunction) {
            DejaGnu.pass("StyleSheet::parseCSS() method exists");
        } else {
            DejaGnu.fail("StyleSheet::parseCSS() method doesn't exist");
        }
-       if (x1.setStyle == null) {
-           DejaGnu.pass("StyleSheet::setStyle() method exists");
-       } else {
-           DejaGnu.fail("StyleSheet::setStyle() method doesn't exist");
-       }
-       if (x1.transform == TextFormat) {
+       
+       if (Type.typeof(x1.transform)==ValueType.TFunction) {
            DejaGnu.pass("StyleSheet::transform() method exists");
        } else {
            DejaGnu.fail("StyleSheet::transform() method doesn't exist");
+           DejaGnu.note("transform: " + Type.typeof(x1.transform));
        }
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/text/TextFieldAutoSize_as.hx'
--- a/testsuite/as3/classes.all/text/TextFieldAutoSize_as.hx    2009-05-21 
00:17:43 +0000
+++ b/testsuite/as3/classes.all/text/TextFieldAutoSize_as.hx    2009-06-03 
17:58:28 +0000
@@ -27,11 +27,11 @@
 import flash.text.TextFieldAutoSize;
 import flash.display.MovieClip;
 #else
-import flash.TextFieldAutoSize;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,21 +39,41 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class TextFieldAutoSize_as {
     static function main() {
-        var x1:TextFieldAutoSize = new TextFieldAutoSize();
-
-        // Make sure we actually get a valid class        
-        if (x1 != null) {
-            DejaGnu.pass("TextFieldAutoSize class exists");
-        } else {
-            DejaGnu.fail("TextFieldAutoSize class 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 flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(TextFieldAutoSize)==TObject) {
+           DejaGnu.pass("TextFieldAutoSize class exists.");
+       } else {
+           DejaGnu.fail("TextFieldAutoSIze class doesn't exist.");
+        }
+
+       
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
+       if (Type.typeof(TextFieldAutoSize.CENTER)!=null) {        
+            DejaGnu.pass("TextFieldAutoSize.CENTER constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldAutoSize.CENTER constant doesn't exist");
+        }
+       if (Type.typeof(TextFieldAutoSize.LEFT)!=null) {
+            DejaGnu.pass("TextFieldAutoSize.LEFT constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldAutoSize.LEFT constant doesn't exist");
+        }
+       if (Type.typeof(TextFieldAutoSize.NONE)!=null) {        
+            DejaGnu.pass("TextFieldAutoSize.NONE constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldAutoSize.NONE constant doesn't exist");
+        }
+       if (Type.typeof(TextFieldAutoSize.RIGHT)!=null) {        
+            DejaGnu.pass("TextFieldAutoSize.RIGHT constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldAutoSize.RIGHT constant doesn't exist");
+        }
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/text/TextFieldType_as.hx'
--- a/testsuite/as3/classes.all/text/TextFieldType_as.hx        2009-05-21 
00:17:43 +0000
+++ b/testsuite/as3/classes.all/text/TextFieldType_as.hx        2009-06-03 
17:58:28 +0000
@@ -21,13 +21,13 @@
 //
 
 // This test case must be processed by CPP before compiling to include the
-//  DejaGnu.hx header file for the testing framework support.
+// DejaGnu.hx header file for the testing framework support.
 
 #if flash9
 import flash.text.TextFieldType;
 import flash.display.MovieClip;
+import flash.text.TextField;
 #else
-import flash.TextFieldType;
 import flash.MovieClip;
 #end
 import flash.Lib;
@@ -39,21 +39,31 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class TextFieldType_as {
     static function main() {
-        var x1:TextFieldType = new TextFieldType();
 
+       #if flash9
         // Make sure we actually get a valid class        
-        if (x1 != null) {
-            DejaGnu.pass("TextFieldType class exists");
-        } else {
-            DejaGnu.fail("TextFieldType class doesn't exist");
-        }
+       if (Type.typeof(TextFieldType)==TObject) {
+           DejaGnu.pass("TextFieldType class exists.");
+       } else {
+           DejaGnu.fail("TextFieldType class 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.
+       // Tests to see if all the constants exist. All these do is test for
+       // existance of a constants, and don't test the functionality at all. 
+       if (Type.typeof(TextFieldType.DYNAMIC)!=null) {        
+            DejaGnu.pass("TextFieldType.DYNAMIC constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldType.DYNAMIC constant doesn't exist");
+        }     
+        if (Type.typeof(TextFieldType.INPUT)!=null) {        
+            DejaGnu.pass("TextFieldType.INPUT constant exists.");
+        } else {
+            DejaGnu.fail("TextFieldType.INPUT constant doesn't exist");
+        } 
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/utils/Proxy_as.hx'
--- a/testsuite/as3/classes.all/utils/Proxy_as.hx       2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/utils/Proxy_as.hx       2009-06-03 17:58:28 
+0000
@@ -27,11 +27,11 @@
 import flash.utils.Proxy;
 import flash.display.MovieClip;
 #else
-import flash.Proxy;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,10 +39,11 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Proxy_as {
     static function main() {
+       #if flash9
         var x1:Proxy = new Proxy();
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, Proxy)) {
             DejaGnu.pass("Proxy class exists");
         } else {
             DejaGnu.fail("Proxy class doesn't exist");
@@ -54,6 +55,7 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/xml/XMLDocument_as.hx'
--- a/testsuite/as3/classes.all/xml/XMLDocument_as.hx   2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/xml/XMLDocument_as.hx   2009-06-03 17:58:28 
+0000
@@ -27,11 +27,11 @@
 import flash.xml.XMLDocument;
 import flash.display.MovieClip;
 #else
-import flash.XMLDocument;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,57 +39,59 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class XMLDocument_as {
     static function main() {
+       #if flash9
         var x1:XMLDocument = new XMLDocument();
 
-        // Make sure we actually get a valid class        
-        if (x1 != null) {
+        // Make sure we actually get a valid class    
+       if (Std.is(x1, XMLDocument)) {    
             DejaGnu.pass("XMLDocument class exists");
         } else {
             DejaGnu.fail("XMLDocument class doesn't exist");
         }
-// 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.
-//     if (x1.docTypeDecl == Object) {
-//         DejaGnu.pass("XMLDocument.docTypeDecl property exists");
-//     } else {
-//         DejaGnu.fail("XMLDocument.docTypeDecl property doesn't exist");
-//     }
-//     if (x1.idMap == Object) {
-//         DejaGnu.pass("XMLDocument.idMap property exists");
-//     } else {
-//         DejaGnu.fail("XMLDocument.idMap property doesn't exist");
-//     }
-       if (x1.ignoreWhite == false) {
+
+       // 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.
+       if (Std.is(x1.docTypeDecl, Dynamic)) {  
+           DejaGnu.pass("XMLDocument.docTypeDecl property exists");
+       } else {
+           DejaGnu.fail("XMLDocument.docTypeDecl property doesn't exist");
+       }
+       if (Std.is(x1.idMap, Dynamic)) {
+           DejaGnu.pass("XMLDocument.idMap property exists");
+       } else {
+           DejaGnu.fail("XMLDocument.idMap property doesn't exist");
+       }
+       if (Std.is(x1.ignoreWhite, Bool)) {
            DejaGnu.pass("XMLDocument.ignoreWhite property exists");
        } else {
            DejaGnu.fail("XMLDocument.ignoreWhite property doesn't exist");
        }
-//     if (x1.xmlDecl == Object) {
-//         DejaGnu.pass("XMLDocument.xmlDecl property exists");
-//     } else {
-//         DejaGnu.fail("XMLDocument.xmlDecl property doesn't exist");
-//     }
+       if (Std.is(x1.xmlDecl, Dynamic)) {
+           DejaGnu.pass("XMLDocument.xmlDecl property exists");
+       } else {
+           DejaGnu.fail("XMLDocument.xmlDecl 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 (x1.createElement == XMLNode) {
-//         DejaGnu.pass("XMLDocument::createElement() method exists");
-//     } else {
-//         DejaGnu.fail("XMLDocument::createElement() method doesn't exist");
-//     }
-//     if (x1.createTextNode == XMLNode) {
-//         DejaGnu.pass("XMLDocument::createTextNode() method exists");
-//     } else {
-//         DejaGnu.fail("XMLDocument::createTextNode() method doesn't exist");
-//     }
-       if (x1.parseXML == null) {
+       // 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.createElement)==TFunction) {
+           DejaGnu.pass("XMLDocument::createElement() method exists");
+       } else {
+           DejaGnu.fail("XMLDocument::createElement() method doesn't exist");
+       }
+       if (Type.typeof(x1.createTextNode)==TFunction) {
+           DejaGnu.pass("XMLDocument::createTextNode() method exists");
+       } else {
+           DejaGnu.fail("XMLDocument::createTextNode() method doesn't exist");
+       }
+       if (Type.typeof(x1.parseXML)==TFunction) {
            DejaGnu.pass("XMLDocument::parseXML() method exists");
        } else {
            DejaGnu.fail("XMLDocument::parseXML() method doesn't exist");
        }
-       if (x1.toString == null) {
+       if (Type.typeof(x1.toString)==TFunction) {
            DejaGnu.pass("XMLDocument::toString() method exists");
        } else {
            DejaGnu.fail("XMLDocument::toString() method doesn't exist");
@@ -97,6 +99,7 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/xml/XMLNodeType_as.hx'
--- a/testsuite/as3/classes.all/xml/XMLNodeType_as.hx   2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/xml/XMLNodeType_as.hx   2009-06-03 17:58:28 
+0000
@@ -27,11 +27,11 @@
 import flash.xml.XMLNodeType;
 import flash.display.MovieClip;
 #else
-import flash.XMLNodeType;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,14 +39,24 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class XMLNodeType_as {
     static function main() {
-        // Make sure we actually get a valid class        
-        if (XMLNodeType.ELEMENT_NODE != null) {
+
+       #if flash9
+       // Make sure we actually get a valid class        
+       if (Type.typeof(XMLNodeType)==TObject) {
+           DejaGnu.pass("XMLNodeType class exists.");
+       } else {
+           DejaGnu.fail("XMLNodeType class doesn't exist");
+       }
+
+       // 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.
+       if (Type.typeof(XMLNodeType.ELEMENT_NODE)!=ValueType.TNull) {
             DejaGnu.pass("XMLNodeType.ELEMENT_NODE constant exists");
         } else {
             DejaGnu.fail("XMLNodeType.ELEMENT_NODE constant doesn't exist");
         }
-
-        if (XMLNodeType.TEXT_NODE != null) {
+        if (Type.typeof(XMLNodeType.TEXT_NODE)!=ValueType.TNull) {
             DejaGnu.pass("XMLNodeType.TEXT_NODE constant exists");
         } else {
             DejaGnu.fail("XMLNodeType.TEXT_NODE constant doesn't exist");
@@ -54,6 +64,7 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/xml/XMLNode_as.hx'
--- a/testsuite/as3/classes.all/xml/XMLNode_as.hx       2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/xml/XMLNode_as.hx       2009-06-03 17:58:28 
+0000
@@ -28,11 +28,11 @@
 import flash.xml.XMLNodeType;
 import flash.display.MovieClip;
 #else
-import flash.XMLNode;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -40,115 +40,122 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class XMLNode_as {
     static function main() {
-        var x1:XMLNode = new XMLNode(XMLNodeType.ELEMENT_NODE, null);
-
+       #if flash9
+        var x1:XMLNode = new XMLNode(XMLNodeType.ELEMENT_NODE, null);  
+       
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, XMLNode)) {
             DejaGnu.pass("XMLNode class exists");
         } else {
             DejaGnu.fail("XMLNode class doesn't exist");
         }
-// 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.
-//     if (x1.attributes == Object) {
-//         DejaGnu.pass("XMLNode.attributes property exists");
-//     } else {
-//         DejaGnu.fail("XMLNode.attributes property doesn't exist");
-//     }
-// FIXME: returns an array
-//     if (x1.childNodes == 0) {
-//         DejaGnu.pass("XMLNode.childNodes property exists");
-//     } else {
-//         DejaGnu.fail("XMLNode.childNodes property doesn't exist");
-//     }
-       if (x1.localName == null) {
+
+       // 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.
+
+       // Need to fix the below four properties.  Do not know how to create a 
parent
+       // node in order to test them.
+       if (Std.is(x1.attributes, Dynamic)) {
+           DejaGnu.pass("XMLNode.attributes property exists");
+       } else {
+           DejaGnu.fail("XMLNode.attributes property doesn't exist");
+       }
+       if (Std.is(x1.childNodes, Array)) {
+           DejaGnu.pass("XMLNode.childNodes property exists");
+       } else {
+           DejaGnu.fail("XMLNode.childNodes property doesn't exist");
+       }
+       if (Type.typeof(x1.localName)==ValueType.TNull) {
            DejaGnu.pass("XMLNode.localName property exists");
        } else {
            DejaGnu.fail("XMLNode.localName property doesn't exist");
        }
-       if (x1.namespaceURI == null) {
+       if (Type.typeof(x1.namespaceURI)==ValueType.TNull) {
            DejaGnu.pass("XMLNode.namespaceURI property exists");
        } else {
            DejaGnu.fail("XMLNode.namespaceURI property doesn't exist");
        }
-       if (x1.nextSibling == x1.nextSibling) {
+       // FIXME
+       /*if (Std.is(x1.nextSibling, XMLNode)) {
            DejaGnu.pass("XMLNode.nextSibling property exists");
        } else {
            DejaGnu.fail("XMLNode.nextSibling property doesn't exist");
-       }
-       if (x1.nodeName == null) {
+           DejaGnu.note("nextSibling: " + Type.typeof(x1.nextSibling));
+       }*/
+       if (Type.typeof(x1.nodeName)==ValueType.TNull) {
            DejaGnu.pass("XMLNode.nodeName property exists");
        } else {
            DejaGnu.fail("XMLNode.nodeName property doesn't exist");
        }
-// FIXME: Int should be flash.xml.XMLNodeType
-//     if (x1.nodeType == 0) {
-//         DejaGnu.pass("XMLNode.nodeType property exists");
-//     } else {
-//         DejaGnu.fail("XMLNode.nodeType property doesn't exist");
-//     }
-       if (x1.nodeValue == null) {
+       // FIXME
+       /*if (Std.is(x1.nodeType, XMLNodeType)) {
+           DejaGnu.pass("XMLNode.nodeType property exists");
+       } else {
+           DejaGnu.fail("XMLNode.nodeType property doesn't exist");
+       }*/
+       if (Type.typeof(x1.nodeValue)==ValueType.TNull) {
            DejaGnu.pass("XMLNode.nodeValue property exists");
        } else {
            DejaGnu.fail("XMLNode.nodeValue property doesn't exist");
        }
-//     if (x1.parentNode == parentNode) {
-//         DejaGnu.pass("XMLNode.parentNode property exists");
-//     } else {
-//         DejaGnu.fail("XMLNode.parentNode property doesn't exist");
-//     }
+       // FIXME
+       /*if (Std.is(x1.parentNode, XMLNode)) {
+           DejaGnu.pass("XMLNode.parentNode property exists");
+       } else {
+           DejaGnu.fail("XMLNode.parentNode property doesn't exist");
+       }*/
        if (x1.prefix == null) {
            DejaGnu.pass("XMLNode.prefix property exists");
        } else {
            DejaGnu.fail("XMLNode.prefix property doesn't exist");
        }
-//     if (x1.previousSibling == previousSibling) {
-//         DejaGnu.pass("XMLNode.previousSibling property exists");
-//     } else {
-//         DejaGnu.fail("XMLNode.previousSibling property doesn't exist");
-//     }
+       // FIXME
+       /*if (Type.typeof(x1.previousSibling)==ValueType.TNull) {
+           DejaGnu.pass("XMLNode.previousSibling property exists");
+       } else {
+           DejaGnu.fail("XMLNode.previousSibling 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 (x1.appendChild == null) {
+       // 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.appendChild)==ValueType.TFunction) {
            DejaGnu.pass("XMLNode::appendChild() method exists");
        } else {
            DejaGnu.fail("XMLNode::appendChild() method doesn't exist");
        }
-//     if (x1.cloneNode == XMLNode) {
-//         DejaGnu.pass("XMLNode::cloneNode() method exists");
-//     } else {
-//         DejaGnu.fail("XMLNode::cloneNode() method doesn't exist");
-//     }
-       if (x1.getNamespaceForPrefix == null) {
+       if (Type.typeof(x1.cloneNode)==ValueType.TFunction) {
+           DejaGnu.pass("XMLNode::cloneNode() method exists");
+       } else {
+           DejaGnu.fail("XMLNode::cloneNode() method doesn't exist");
+       }
+       if (Type.typeof(x1.getNamespaceForPrefix)==ValueType.TFunction) {
            DejaGnu.pass("XMLNode::getNamespaceForPrefix() method exists");
        } else {
            DejaGnu.fail("XMLNode::getNamespaceForPrefix() method doesn't 
exist");
        }
-       if (x1.getPrefixForNamespace == null) {
+       if (Type.typeof(x1.getPrefixForNamespace)==ValueType.TFunction) {
            DejaGnu.pass("XMLNode::getPrefixForNamespace() method exists");
        } else {
            DejaGnu.fail("XMLNode::getPrefixForNamespace() method doesn't 
exist");
        }
-// FIXME:  Bool should be Void -> Bool
-//     if (x1.hasChildNodes == false) {
-//         DejaGnu.pass("XMLNode::hasChildNodes() method exists");
-//     } else {
-//         DejaGnu.fail("XMLNode::hasChildNodes() method doesn't exist");
-//     }
-       if (x1.insertBefore == null) {
+       if (Type.typeof(x1.hasChildNodes)==TFunction) {
+           DejaGnu.pass("XMLNode::hasChildNodes() method exists");
+       } else {
+           DejaGnu.fail("XMLNode::hasChildNodes() method doesn't exist");
+       }
+       if (Type.typeof(x1.insertBefore)==TFunction) {
            DejaGnu.pass("XMLNode::insertBefore() method exists");
        } else {
            DejaGnu.fail("XMLNode::insertBefore() method doesn't exist");
        }
-       if (x1.removeNode == null) {
+       if (Type.typeof(x1.removeNode)==TFunction) {
            DejaGnu.pass("XMLNode::removeNode() method exists");
        } else {
            DejaGnu.fail("XMLNode::removeNode() method doesn't exist");
        }
-       if (x1.toString == null) {
+       if (Type.typeof(x1.toString)==TFunction) {
            DejaGnu.pass("XMLNode::toString() method exists");
        } else {
            DejaGnu.fail("XMLNode::toString() method doesn't exist");
@@ -156,6 +163,7 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+       #end
     }
 }
 


reply via email to

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