gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10969: Fixed Makefile.am to include


From: Bob Naugle
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10969: Fixed Makefile.am to include sampler, text, and utils namespaces. New Test cases.
Date: Tue, 02 Jun 2009 12:16:55 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 10969
committer: Bob Naugle <address@hidden>
branch nick: trunk
timestamp: Tue 2009-06-02 12:16:55 -0600
message:
  Fixed Makefile.am to include sampler, text, and utils namespaces. New Test 
cases.
modified:
  testsuite/as3/classes.all/Makefile.am
  testsuite/as3/classes.all/geom/Matrix_as.hx
  testsuite/as3/classes.all/geom/Point_as.hx
  testsuite/as3/classes.all/net/FileFilter_as.hx
  testsuite/as3/classes.all/net/FileReference_as.hx
  testsuite/as3/classes.all/net/Socket_as.hx
  testsuite/as3/classes.all/text/AntiAliasType_as.hx
  testsuite/as3/classes.all/ui/KeyLocation_as.hx
  testsuite/as3/classes.all/utils/Dictionary_as.hx
  testsuite/as3/classes.all/utils/Endian_as.hx
  testsuite/as3/classes.all/utils/Timer_as.hx
=== modified file 'testsuite/as3/classes.all/Makefile.am'
--- a/testsuite/as3/classes.all/Makefile.am     2009-05-21 15:42:33 +0000
+++ b/testsuite/as3/classes.all/Makefile.am     2009-06-02 18:16:55 +0000
@@ -56,13 +56,13 @@
 include $(srcdir)/media/media.am
 include $(srcdir)/net/net.am
 include $(srcdir)/printing/printing.am
-# # include $(srcdir)/sampler/sampler.am
+include $(srcdir)/sampler/sampler.am
 # # HAXE doesn't appear to support the Security classes
 # # include $(srcdir)/security/security.am
 include $(srcdir)/system/system.am
-# # include $(srcdir)/text/text.am
+include $(srcdir)/text/text.am
 include $(srcdir)/ui/ui.am
-# # include $(srcdir)/utils/utils.am
+include $(srcdir)/utils/utils.am
 include $(srcdir)/xml/xml.am
 
 #/usr/bin/haxe -swf-version 9 -cp 
/home/rob/projects/gnu/gnash-bzr/avm2/testsuite/as3/classes.all -cp 
/home/rob/projects/gnu/gnash-bzr/avm2/testsuite/as3/classes.all/media -swf 
Sound_as3.swf -main Sound_as3.hx

=== modified file 'testsuite/as3/classes.all/geom/Matrix_as.hx'
--- a/testsuite/as3/classes.all/geom/Matrix_as.hx       2009-06-01 17:24:36 
+0000
+++ b/testsuite/as3/classes.all/geom/Matrix_as.hx       2009-06-02 18:16:55 
+0000
@@ -25,10 +25,13 @@
 
 #if flash9
 import flash.display.MovieClip;
-#else
+#end
+#if flash8
 import flash.MovieClip;
 #end
+#if !(flash6 || flash7)
 import flash.geom.Matrix;
+#end
 import flash.Lib;
 import Type;
 import Std;
@@ -39,6 +42,7 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Matrix_as {
     static function main() {
+#if !(flash6 || flash7)
         var x1:Matrix = new Matrix();
 
         // Make sure we actually get a valid class        
@@ -147,6 +151,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+    DejaGnu.note("This class (Matrix) is only available in flash8 and flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/geom/Point_as.hx'
--- a/testsuite/as3/classes.all/geom/Point_as.hx        2009-06-01 17:24:36 
+0000
+++ b/testsuite/as3/classes.all/geom/Point_as.hx        2009-06-02 18:16:55 
+0000
@@ -25,10 +25,13 @@
 
 #if flash9
 import flash.display.MovieClip;
-#else
+#end
+#if flash8
 import flash.MovieClip;
 #end
+#if !(flash6 || flash7)
 import flash.geom.Point;
+#end
 import flash.Lib;
 import Type;
 import Std;
@@ -39,6 +42,7 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Point_as {
     static function main() {
+#if !(flash6 || flash7)
 #if flash9
        var x1:Point = new Point();
 #else
@@ -122,6 +126,9 @@
        }
         // Call this after finishing all tests. It prints out the totals.
     DejaGnu.done();
+#else
+    DejaGnu.note("This class (Matrix) is only available in flash8 and flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/net/FileFilter_as.hx'
--- a/testsuite/as3/classes.all/net/FileFilter_as.hx    2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/net/FileFilter_as.hx    2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // FileFilter_as.hx:  ActionScript 3 "FileFilter" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,10 @@
 #if flash9
 import flash.net.FileFilter;
 import flash.display.MovieClip;
-#else
-import flash.FileFilter;
-import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,10 +37,11 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class FileFilter_as {
     static function main() {
-        var x1:FileFilter = new FileFilter(null, null, null);
+#if flash9
+        var x1:FileFilter = new FileFilter("description", "extension", 
"macType");
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, FileFilter)) {
             DejaGnu.pass("FileFilter class exists");
         } else {
             DejaGnu.fail("FileFilter class doesn't exist");
@@ -50,17 +49,17 @@
 // 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.description == null) {
+       if (Std.is(x1.description, String)) {
            DejaGnu.pass("FileFilter.description property exists");
        } else {
            DejaGnu.fail("FileFilter.description property doesn't exist");
        }
-       if (x1.extension == null) {
+       if (Std.is(x1.extension, String)) {
            DejaGnu.pass("FileFilter.extension property exists");
        } else {
            DejaGnu.fail("FileFilter.extension property doesn't exist");
        }
-       if (x1.macType == null) {
+       if (Std.is(x1.macType, String)) {
            DejaGnu.pass("FileFilter.macType property exists");
        } else {
            DejaGnu.fail("FileFilter.macType property doesn't exist");
@@ -68,6 +67,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (FileFilter) is only available in flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/net/FileReference_as.hx'
--- a/testsuite/as3/classes.all/net/FileReference_as.hx 2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/net/FileReference_as.hx 2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // FileReference_as.hx:  ActionScript 3 "FileReference" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,13 @@
 #if flash9
 import flash.net.FileReference;
 import flash.display.MovieClip;
-#else
-import flash.FileReference;
+#elseif flash8
+import flash.net.FileReference;
 import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,75 +40,83 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class FileReference_as {
     static function main() {
+#if (flash9 || flash8)
         var x1:FileReference = new FileReference();
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, FileReference)) {
             DejaGnu.pass("FileReference class exists");
         } else {
             DejaGnu.fail("FileReference class doesn't exist");
         }
+//FIXME: Must browse to populate FileReference fields, and even then the 
fields are not correct.
+               DejaGnu.note("This test is incomplete. The fields of 
FileReference have not been correctly populated");
 // 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
+// existence 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.creationDate == Date) {
-//         DejaGnu.pass("FileReference.creationDate property exists");
-//     } else {
-//         DejaGnu.fail("FileReference.creationDate property doesn't exist");
-//     }
-       if (x1.creator == null) {
+#if flash8
+       if (Std.is(x1.postData, String)) {
+           DejaGnu.pass("FileReference.postData property exists");
+       } else {
+           DejaGnu.fail("FileReference.postData property doesn't exist");
+       }
+#end
+       if (Std.is(x1.creator, String)) {
            DejaGnu.pass("FileReference.creator property exists");
        } else {
            DejaGnu.fail("FileReference.creator property doesn't exist");
        }
-// FIXME: returns an array
-//     if (x1.extension == null) {
-//         DejaGnu.pass("FileReference.extension property exists");
-//     } else {
-//         DejaGnu.fail("FileReference.extension property doesn't exist");
-//     }
-
-//     if (x1.modificationDate == Date) {
-//         DejaGnu.pass("FileReference.modificationDate property exists");
-//     } else {
-//         DejaGnu.fail("FileReference.modificationDate property doesn't 
exist");
-//     }
-       if (x1.name == null) {
+       if (Std.is(x1.name, String)) {
            DejaGnu.pass("FileReference.name property exists");
        } else {
            DejaGnu.fail("FileReference.name property doesn't exist");
        }
-       if (x1.size == 0) {
+       if (Std.is(x1.size, Float)) {
            DejaGnu.pass("FileReference.size property exists");
        } else {
            DejaGnu.fail("FileReference.size property doesn't exist");
        }
-       if (x1.type == null) {
+       if (Std.is(x1.type, String)) {
            DejaGnu.pass("FileReference.type property exists");
        } else {
            DejaGnu.fail("FileReference.type property doesn't exist");
        }
+       if (Std.is(x1.creationDate, Date)) {
+           DejaGnu.pass("FileReference.creationDate property exists");
+       } else {
+           DejaGnu.fail("FileReference.creationDate property doesn't exist");
+       }
+       if (Std.is(x1.modificationDate, Date)) {
+           DejaGnu.pass("FileReference.modificationDate property exists");
+       } else {
+           DejaGnu.fail("FileReference.modificationDate property doesn't 
exist");
+       }
+//FIXME: The .extension property is only available in AIR
+//     if (Std.is(x1.extension, String)) {
+//         DejaGnu.pass("FileReference.extension property exists");
+//     } else {
+//         DejaGnu.fail("FileReference.extension 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.
-// FIXME: needs an array
-//     if (x1.browse == false) {
-//         DejaGnu.pass("FileReference::browse() method exists");
-//     } else {
-//         DejaGnu.fail("FileReference::browse() method doesn't exist");
-//     }
-       if (x1.cancel == null) {
+       if (Type.typeof(x1.browse) == ValueType.TFunction) {
+           DejaGnu.pass("FileReference::browse() method exists");
+       } else {
+           DejaGnu.fail("FileReference::browse() method doesn't exist");
+       }
+       if (Type.typeof(x1.cancel) == ValueType.TFunction) {
            DejaGnu.pass("FileReference::cancel() method exists");
        } else {
            DejaGnu.fail("FileReference::cancel() method doesn't exist");
        }
-       if (x1.download == null) {
+       if (Type.typeof(x1.download) == ValueType.TFunction) {
            DejaGnu.pass("FileReference::download() method exists");
        } else {
            DejaGnu.fail("FileReference::download() method doesn't exist");
        }
-       if (x1.upload == null) {
+       if (Type.typeof(x1.upload) == ValueType.TFunction) {
            DejaGnu.pass("FileReference::upload() method exists");
        } else {
            DejaGnu.fail("FileReference::upload() method doesn't exist");
@@ -121,6 +130,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (FileReference) is only available in flash8 
and flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/net/Socket_as.hx'
--- a/testsuite/as3/classes.all/net/Socket_as.hx        2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/net/Socket_as.hx        2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // Socket_as.hx:  ActionScript 3 "Socket" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,11 @@
 #if flash9
 import flash.net.Socket;
 import flash.display.MovieClip;
-#else
-import flash.Socket;
-import flash.MovieClip;
+import flash.utils.Endian;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,10 +38,11 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Socket_as {
     static function main() {
+#if flash9
         var x1:Socket = new Socket();
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, Socket)) {
             DejaGnu.pass("Socket class exists");
         } else {
             DejaGnu.fail("Socket class doesn't exist");
@@ -50,22 +50,23 @@
 // 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.bytesAvailable == 0) {
-           DejaGnu.pass("Socket.bytesAvailable property exists");
-       } else {
-           DejaGnu.fail("Socket.bytesAvailable property doesn't exist");
-       }
-       if (x1.connected == false) {
+//FIXME: This test will only work if we have a valid Socket
+//     if (Std.is(x1.bytesAvailable, Int)) {
+//         DejaGnu.pass("Socket.bytesAvailable property exists");
+//     } else {
+//         DejaGnu.fail("Socket.bytesAvailable property doesn't exist");
+//     }
+       if (Std.is(x1.connected, Bool)) {
            DejaGnu.pass("Socket.connected property exists");
        } else {
            DejaGnu.fail("Socket.connected property doesn't exist");
        }
-       if (x1.endian == null) {
+       if (Std.is(x1.endian, String)) {
            DejaGnu.pass("Socket.endian property exists");
        } else {
            DejaGnu.fail("Socket.endian property doesn't exist");
        }
-       if (x1.objectEncoding == 0) {
+       if (Std.is(x1.objectEncoding, Int)) {
            DejaGnu.pass("Socket.objectEncoding property exists");
        } else {
            DejaGnu.fail("Socket.objectEncoding property doesn't exist");
@@ -74,148 +75,147 @@
 // 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.close == null) {
+       if (Type.typeof(x1.close) == ValueType.TFunction) {
            DejaGnu.pass("Socket::close() method exists");
        } else {
            DejaGnu.fail("Socket::close() method doesn't exist");
        }
-       if (x1.connect == null) {
+       if (Type.typeof(x1.close) == ValueType.TFunction) {
            DejaGnu.pass("Socket::connect() method exists");
        } else {
            DejaGnu.fail("Socket::connect() method doesn't exist");
        }
-       if (x1.flush == null) {
+       if (Type.typeof(x1.close) == ValueType.TFunction) {
            DejaGnu.pass("Socket::flush() method exists");
        } else {
            DejaGnu.fail("Socket::flush() method doesn't exist");
        }
-// FIXME: this all return VOID, so nothing at all      
-//     if (x1.readBoolean == false) {
-//         DejaGnu.pass("Socket::readBoolean() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readBoolean() method doesn't exist");
-//     }
-//     if (x1.readByte == 0) {
-//         DejaGnu.pass("Socket::readByte() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readByte() method doesn't exist");
-//     }
-//     if (x1.readBytes == null) {
-//         DejaGnu.pass("Socket::readBytes() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readBytes() method doesn't exist");
-//     }
-//     if (x1.readDouble == 0) {
-//         DejaGnu.pass("Socket::readDouble() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readDouble() method doesn't exist");
-//     }
-//     if (x1.readFloat == 0) {
-//         DejaGnu.pass("Socket::readFloat() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readFloat() method doesn't exist");
-//     }
-//     if (x1.readInt == 0) {
-//         DejaGnu.pass("Socket::readInt() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readInt() method doesn't exist");
-//     }
-//     if (x1.readMultiByte == null) {
-//         DejaGnu.pass("Socket::readMultiByte() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readMultiByte() method doesn't exist");
-//     }
-//     if (x1.readObject == 0) {
-//         DejaGnu.pass("Socket::readObject() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readObject() method doesn't exist");
-//     }
-//     if (x1.readShort == 0) {
-//         DejaGnu.pass("Socket::readShort() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readShort() method doesn't exist");
-//     }
-//     if (x1.readUnsignedByte == 0) {
-//         DejaGnu.pass("Socket::readUnsignedByte() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readUnsignedByte() method doesn't exist");
-//     }
-//     if (x1.readUnsignedInt == 0) {
-//         DejaGnu.pass("Socket::readUnsignedInt() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readUnsignedInt() method doesn't exist");
-//     }
-//     if (x1.readUnsignedShort == 0) {
-//         DejaGnu.pass("Socket::readUnsignedShort() method exists");
-//     } else {
-//         DejaGnu.fail("Socket::readUnsignedShort() method doesn't exist");
-//     }
-       if (x1.readUTF == null) {
+       if (Type.typeof(x1.readBoolean) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readBoolean() method exists");
+       } else {
+           DejaGnu.fail("Socket::readBoolean() method doesn't exist");
+       }
+       if (Type.typeof(x1.readByte) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readByte() method exists");
+       } else {
+           DejaGnu.fail("Socket::readByte() method doesn't exist");
+       }
+       if (Type.typeof(x1.readBytes) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readBytes() method exists");
+       } else {
+           DejaGnu.fail("Socket::readBytes() method doesn't exist");
+       }
+       if (Type.typeof(x1.readDouble) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readDouble() method exists");
+       } else {
+           DejaGnu.fail("Socket::readDouble() method doesn't exist");
+       }
+       if (Type.typeof(x1.readFloat) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readFloat() method exists");
+       } else {
+           DejaGnu.fail("Socket::readFloat() method doesn't exist");
+       }
+       if (Type.typeof(x1.readInt) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readInt() method exists");
+       } else {
+           DejaGnu.fail("Socket::readInt() method doesn't exist");
+       }
+       if (Type.typeof(x1.readMultiByte) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readMultiByte() method exists");
+       } else {
+           DejaGnu.fail("Socket::readMultiByte() method doesn't exist");
+       }
+       if (Type.typeof(x1.readObject) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readObject() method exists");
+       } else {
+           DejaGnu.fail("Socket::readObject() method doesn't exist");
+       }
+       if (Type.typeof(x1.readShort) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readShort() method exists");
+       } else {
+           DejaGnu.fail("Socket::readShort() method doesn't exist");
+       }
+       if (Type.typeof(x1.readUnsignedByte) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readUnsignedByte() method exists");
+       } else {
+           DejaGnu.fail("Socket::readUnsignedByte() method doesn't exist");
+       }
+       if (Type.typeof(x1.readUnsignedInt) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readUnsignedInt() method exists");
+       } else {
+           DejaGnu.fail("Socket::readUnsignedInt() method doesn't exist");
+       }
+       if (Type.typeof(x1.readUnsignedShort) == ValueType.TFunction) {
+           DejaGnu.pass("Socket::readUnsignedShort() method exists");
+       } else {
+           DejaGnu.fail("Socket::readUnsignedShort() method doesn't exist");
+       }
+       if (Type.typeof(x1.readUTF) == ValueType.TFunction) {
            DejaGnu.pass("Socket::readUTF() method exists");
        } else {
            DejaGnu.fail("Socket::readUTF() method doesn't exist");
        }
-       if (x1.readUTFBytes == null) {
+       if (Type.typeof(x1.readUTFBytes) == ValueType.TFunction) {
            DejaGnu.pass("Socket::readUTFBytes() method exists");
        } else {
            DejaGnu.fail("Socket::readUTFBytes() method doesn't exist");
        }
-       if (x1.writeBoolean == null) {
+       if (Type.typeof(x1.writeBoolean) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeBoolean() method exists");
        } else {
            DejaGnu.fail("Socket::writeBoolean() method doesn't exist");
        }
-       if (x1.writeByte == null) {
+       if (Type.typeof(x1.writeByte) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeByte() method exists");
        } else {
            DejaGnu.fail("Socket::writeByte() method doesn't exist");
        }
-       if (x1.writeBytes == null) {
+       if (Type.typeof(x1.writeBytes) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeBytes() method exists");
        } else {
            DejaGnu.fail("Socket::writeBytes() method doesn't exist");
        }
-       if (x1.writeDouble == null) {
+       if (Type.typeof(x1.writeDouble) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeDouble() method exists");
        } else {
            DejaGnu.fail("Socket::writeDouble() method doesn't exist");
        }
-       if (x1.writeFloat == null) {
+       if (Type.typeof(x1.writeFloat) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeFloat() method exists");
        } else {
            DejaGnu.fail("Socket::writeFloat() method doesn't exist");
        }
-       if (x1.writeInt == null) {
+       if (Type.typeof(x1.writeInt) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeInt() method exists");
        } else {
            DejaGnu.fail("Socket::writeInt() method doesn't exist");
        }
-       if (x1.writeMultiByte == null) {
+       if (Type.typeof(x1.writeMultiByte) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeMultiByte() method exists");
        } else {
            DejaGnu.fail("Socket::writeMultiByte() method doesn't exist");
        }
-       if (x1.writeObject == null) {
+       if (Type.typeof(x1.writeObject) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeObject() method exists");
        } else {
            DejaGnu.fail("Socket::writeObject() method doesn't exist");
        }
-       if (x1.writeShort == null) {
+       if (Type.typeof(x1.writeShort) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeShort() method exists");
        } else {
            DejaGnu.fail("Socket::writeShort() method doesn't exist");
        }
-       if (x1.writeUnsignedInt == null) {
+       if (Type.typeof(x1.writeUnsignedInt) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeUnsignedInt() method exists");
        } else {
            DejaGnu.fail("Socket::writeUnsignedInt() method doesn't exist");
        }
-       if (x1.writeUTF == null) {
+       if (Type.typeof(x1.writeUTF) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeUTF() method exists");
        } else {
            DejaGnu.fail("Socket::writeUTF() method doesn't exist");
        }
-       if (x1.writeUTFBytes == null) {
+       if (Type.typeof(x1.writeUTFBytes) == ValueType.TFunction) {
            DejaGnu.pass("Socket::writeUTFBytes() method exists");
        } else {
            DejaGnu.fail("Socket::writeUTFBytes() method doesn't exist");
@@ -223,6 +223,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (Socket) is only available in flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/text/AntiAliasType_as.hx'
--- a/testsuite/as3/classes.all/text/AntiAliasType_as.hx        2009-05-21 
00:17:43 +0000
+++ b/testsuite/as3/classes.all/text/AntiAliasType_as.hx        2009-06-02 
18:16:55 +0000
@@ -26,9 +26,6 @@
 #if flash9
 import flash.text.AntiAliasType;
 import flash.display.MovieClip;
-#else
-import flash.AntiAliasType;
-import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
@@ -39,21 +36,44 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class AntiAliasType_as {
     static function main() {
-        var x1:AntiAliasType = new AntiAliasType();
-
-        // Make sure we actually get a valid class        
-        if (x1 != null) {
-            DejaGnu.pass("AntiAliasType class exists");
-        } else {
-            DejaGnu.fail("AntiAliasType 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
+
+               if (AntiAliasType.ADVANCED != null) {
+            DejaGnu.pass("AntiAliasType.ADVANCED class exists");
+            if (Std.is(AntiAliasType.ADVANCED, String)) {
+               DejaGnu.pass("AntiAliasType.ADVANCED is a String");
+               if (Std.string(AntiAliasType.ADVANCED) == "advanced") {
+                       DejaGnu.pass("AntiAliasType.ADVANCED is the correct 
string (advanced)");
+               } else {
+                       DejaGnu.fail("AntiAliasType.ADVANCED is not the correct 
string (Should be advanced, but is "+AntiAliasType.ADVANCED+")");
+               }
+            } else {
+               DejaGnu.fail("AntiAliasType.ADVANCED is not a string. Instead, 
it is a "+Type.typeof(AntiAliasType.ADVANCED));
+            }
+        } else {
+            DejaGnu.fail("AntiAliasType.ADVANCED class doesn't exist");
+        }
+        if (AntiAliasType.NORMAL != null) {
+            DejaGnu.pass("AntiAliasType.NORMAL class exists");
+            if (Std.is(AntiAliasType.NORMAL, String)) {
+               DejaGnu.pass("AntiAliasType.NORMAL is a String");
+               if (Std.string(AntiAliasType.NORMAL) == "normal") {
+                       DejaGnu.pass("AntiAliasType.NORMAL is the correct 
string (normal)");
+               } else {
+                       DejaGnu.fail("AntiAliasType.NORMAL is not the correct 
string (Should be normal, but is "+AntiAliasType.NORMAL+")");
+               }
+            } else {
+               DejaGnu.fail("AntiAliasType.NORMAL is not a string. Instead, it 
is a "+Type.typeof(AntiAliasType.NORMAL));
+            }
+        } else {
+            DejaGnu.fail("AntiAliasType.NORMAL doesn't exist");
+        }
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (AntiAliasType) is only available in flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/ui/KeyLocation_as.hx'
--- a/testsuite/as3/classes.all/ui/KeyLocation_as.hx    2009-05-25 02:00:57 
+0000
+++ b/testsuite/as3/classes.all/ui/KeyLocation_as.hx    2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // KeyLocation_as.hx:  ActionScript 3 "KeyLocation" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -25,46 +25,93 @@
 
 #if flash9
 import flash.ui.KeyLocation;
-import flash.events.KeyboardEvent;
 import flash.display.MovieClip;
+#end
 import flash.Lib;
 import Type;
 
+
 // import our testing API
 import DejaGnu;
 
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class KeyLocation_as {
     static function main() {
+#if flash9
 
 // Tests to see if all the constants exist.
-
-       if (Type.typeof(KeyLocation.STANDARD) == TInt) {
-           DejaGnu.pass("Key constant exists");
-       } else {
-           DejaGnu.fail("Key constant doesn't exist");
-       }
-       if (Type.typeof(KeyLocation.LEFT) == TInt) {
-           DejaGnu.pass("Key constant exists");
-       } else {
-           DejaGnu.fail("Key constant doesn't exist");
-       }    
-       if (Type.typeof(KeyLocation.RIGHT) == TInt) {
-           DejaGnu.pass("Key constant exists");
-       } else {
-           DejaGnu.fail("Key constant doesn't exist");
-       }
-       if (Type.typeof(KeyLocation.NUM_PAD) == TInt) {
-           DejaGnu.pass("Key constant exists");
-       } else {
-           DejaGnu.fail("Key constant doesn't exist");
-       }
+//     if (KeyLocation.STANDARD != null) {
+//        DejaGnu.pass("KeyLocation.STANDARD constant exists");
+        if (Std.is(KeyLocation.STANDARD, Int)) {
+               DejaGnu.pass("KeyLocation.STANDARD is an int");
+               if (Std.string(KeyLocation.STANDARD) == "0") {
+                       DejaGnu.pass("KeyLocation.STANDARD is the correct int 
(0)");
+               } else {
+                       DejaGnu.fail("KeyLocation.STANDARD is not the correct 
int (Should be 0, but is "+KeyLocation.STANDARD+")");
+               }
+        } else {
+               DejaGnu.fail("KeyLocation.STANDARD is not an int. Instead, it 
is a "+Type.typeof(KeyLocation.STANDARD));
+        }
+
+//    } else {
+//        DejaGnu.fail("KeyLocation.STANDARD constant doesn't exist");
+//    }
+    
+//     if (KeyLocation.LEFT != null) {
+//        DejaGnu.pass("KeyLocation.LEFT constant exists");
+        if (Std.is(KeyLocation.LEFT, Int)) {
+               DejaGnu.pass("KeyLocation.LEFT is an int");
+               if (Std.string(KeyLocation.LEFT) == "1") {
+                       DejaGnu.pass("KeyLocation.LEFT is the correct int (1)");
+               } else {
+                       DejaGnu.fail("KeyLocation.LEFT is not the correct int 
(Should be 1, but is "+KeyLocation.LEFT+")");
+               }
+        } else {
+               DejaGnu.fail("KeyLocation.LEFT is not an int. Instead, it is a 
"+Type.typeof(KeyLocation.LEFT));
+        }
+//    } else {
+//        DejaGnu.fail("KeyLocation.LEFT constant doesn't exist");
+//    }
+    
+//     if (KeyLocation.RIGHT != null) {
+//        DejaGnu.pass("KeyLocation.RIGHT constant exists");
+        if (Std.is(KeyLocation.RIGHT, Int)) {
+               DejaGnu.pass("KeyLocation.RIGHT is an int");
+               if (Std.string(KeyLocation.RIGHT) == "2") {
+                       DejaGnu.pass("KeyLocation.RIGHT is the correct int 
(2)");
+               } else {
+                       DejaGnu.fail("KeyLocation.RIGHT is not the correct int 
(Should be 2, but is "+KeyLocation.RIGHT+")");
+               }
+        } else {
+               DejaGnu.fail("KeyLocation.RIGHT is not an int. Instead, it is a 
"+Type.typeof(KeyLocation.RIGHT));
+        }
+//    } else {
+//        DejaGnu.fail("KeyLocation.RIGHT constant doesn't exist");
+//    }
+
+//     if (KeyLocation.NUM_PAD != null) {
+//        DejaGnu.pass("KeyLocation.NUM_PAD constant exists");
+        if (Std.is(KeyLocation.NUM_PAD, Int)) {
+               DejaGnu.pass("KeyLocation.NUM_PAD is an int");
+               if (Std.string(KeyLocation.NUM_PAD) == "3") {
+                       DejaGnu.pass("KeyLocation.NUM_PAD is the correct int 
(3)");
+               } else {
+                       DejaGnu.fail("KeyLocation.NUM_PAD is not the correct 
int (Should be 3, but is "+KeyLocation.NUM_PAD+")");
+               }
+        } else {
+               DejaGnu.fail("KeyLocation.NUM_PAD is not an int. Instead, it is 
a "+Type.typeof(KeyLocation.NUM_PAD));
+        }
+//    } else {
+//        DejaGnu.fail("KeyLocation.NUM_PAD constant doesn't exist");
+//    }  
        
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (KeyLocation) is only available in flash9");
+#end
     }
 }
-#end
     
 // local Variables:
 // mode: C++

=== modified file 'testsuite/as3/classes.all/utils/Dictionary_as.hx'
--- a/testsuite/as3/classes.all/utils/Dictionary_as.hx  2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/utils/Dictionary_as.hx  2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // Dictionary_as.hx:  ActionScript 3 "Dictionary" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,10 @@
 #if flash9
 import flash.utils.Dictionary;
 import flash.display.MovieClip;
-#else
-import flash.Dictionary;
-import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,10 +37,11 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Dictionary_as {
     static function main() {
+#if flash9
         var x1:Dictionary = new Dictionary();
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, Dictionary)) {
             DejaGnu.pass("Dictionary class exists");
         } else {
             DejaGnu.fail("Dictionary class doesn't exist");
@@ -54,6 +53,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (Dictionary) is only available in flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/utils/Endian_as.hx'
--- a/testsuite/as3/classes.all/utils/Endian_as.hx      2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/utils/Endian_as.hx      2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // Endian_as.hx:  ActionScript 3 "Endian" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,10 @@
 #if flash9
 import flash.utils.Endian;
 import flash.display.MovieClip;
-#else
-import flash.Endian;
-import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,21 +37,46 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Endian_as {
     static function main() {
-        var x1:Endian = new Endian();
-
-        // Make sure we actually get a valid class        
-        if (x1 != null) {
-            DejaGnu.pass("Endian class exists");
-        } else {
-            DejaGnu.fail("Endian 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
+
+//FIXME: If test fails, remember Adobe spec says string should be bigEndian, 
but haXe may say big_endian
+               if (Endian.BIG_ENDIAN != null) {
+            DejaGnu.pass("Endian.BIG_ENDIAN class exists");
+            if (Std.is(Endian.BIG_ENDIAN, String)) {
+               DejaGnu.pass("Endian.BIG_ENDIAN is a String");
+               if (Std.string(Endian.BIG_ENDIAN) == "bigEndian") {
+                       DejaGnu.pass("Endian.BIG_ENDIAN is the correct string 
(bigEndian)");
+               } else {
+                       DejaGnu.fail("Endian.BIG_ENDIAN is not the correct 
string (Should be bigEndian, but is "+Endian.BIG_ENDIAN+")");
+               }
+            } else {
+               DejaGnu.fail("Endian.BIG_ENDIAN is not a string. Instead, it is 
a "+Type.typeof(Endian.BIG_ENDIAN));
+            }
+        } else {
+            DejaGnu.fail("Endian.BIG_ENDIAN class doesn't exist");
+        }
+        
+        if (Endian.LITTLE_ENDIAN != null) {
+            DejaGnu.pass("Endian.LITTLE_ENDIAN class exists");
+            if (Std.is(Endian.BIG_ENDIAN, String)) {
+               DejaGnu.pass("Endian.LITTLE_ENDIAN is a String");
+               if (Std.string(Endian.LITTLE_ENDIAN) == "littleEndian") {
+                       DejaGnu.pass("Endian.LITTLE_ENDIAN is the correct 
string (littleEndian)");
+               } else {
+                       DejaGnu.fail("Endian.LITTLE_ENDIAN is not the correct 
string (Should be littleEndian, but is "+Endian.LITTLE_ENDIAN+")");
+               }
+            } else {
+               DejaGnu.fail("Endian.LITTLE_ENDIAN is not a string. Instead, it 
is a "+Type.typeof(Endian.LITTLE_ENDIAN));
+            }
+        } else {
+            DejaGnu.fail("Endian.LITTLE_ENDIAN class doesn't exist");
+        }
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (Endian) is only available in flash9");
+#end
     }
 }
 

=== modified file 'testsuite/as3/classes.all/utils/Timer_as.hx'
--- a/testsuite/as3/classes.all/utils/Timer_as.hx       2009-05-21 00:17:43 
+0000
+++ b/testsuite/as3/classes.all/utils/Timer_as.hx       2009-06-02 18:16:55 
+0000
@@ -1,6 +1,6 @@
 // Timer_as.hx:  ActionScript 3 "Timer" class, for Gnash.
 //
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090602 by "bnaugle". Remove this
 // after any hand editing loosing changes.
 //
 //   Copyright (C) 2009 Free Software Foundation, Inc.
@@ -26,12 +26,10 @@
 #if flash9
 import flash.utils.Timer;
 import flash.display.MovieClip;
-#else
-import flash.Timer;
-import flash.MovieClip;
 #end
 import flash.Lib;
 import Type;
+import Std;
 
 // import our testing API
 import DejaGnu;
@@ -39,10 +37,11 @@
 // Class must be named with the _as suffix, as that's the same name as the 
file.
 class Timer_as {
     static function main() {
-        var x1:Timer = new Timer();
+#if flash9
+        var x1:Timer = new Timer(0,0);
 
         // Make sure we actually get a valid class        
-        if (x1 != null) {
+        if (Std.is(x1, Timer)) {
             DejaGnu.pass("Timer class exists");
         } else {
             DejaGnu.fail("Timer class doesn't exist");
@@ -50,22 +49,22 @@
 // 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.currentCount == 0) {
+       if (Std.is(x1.currentCount, Int)) {
            DejaGnu.pass("Timer.currentCount property exists");
        } else {
            DejaGnu.fail("Timer.currentCount property doesn't exist");
        }
-       if (x1.delay == 0) {
+       if (Std.is(x1.delay, Int)) {
            DejaGnu.pass("Timer.delay property exists");
        } else {
            DejaGnu.fail("Timer.delay property doesn't exist");
        }
-       if (x1.repeatCount == 0) {
+       if (Std.is(x1.repeatCount, Int)) {
            DejaGnu.pass("Timer.repeatCount property exists");
        } else {
            DejaGnu.fail("Timer.repeatCount property doesn't exist");
        }
-       if (x1.running == false) {
+       if (Std.is(x1.running, Bool)) {
            DejaGnu.pass("Timer.running property exists");
        } else {
            DejaGnu.fail("Timer.running property doesn't exist");
@@ -74,22 +73,17 @@
 // 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.Timer == 0) {
-           DejaGnu.pass("Timer::Timer() method exists");
-       } else {
-           DejaGnu.fail("Timer::Timer() method doesn't exist");
-       }
-       if (x1.reset == null) {
+       if (Type.typeof(x1.reset) == ValueType.TFunction) {
            DejaGnu.pass("Timer::reset() method exists");
        } else {
            DejaGnu.fail("Timer::reset() method doesn't exist");
        }
-       if (x1.start == null) {
+       if (Type.typeof(x1.start) == ValueType.TFunction) {
            DejaGnu.pass("Timer::start() method exists");
        } else {
            DejaGnu.fail("Timer::start() method doesn't exist");
        }
-       if (x1.stop == null) {
+       if (Type.typeof(x1.stop) == ValueType.TFunction) {
            DejaGnu.pass("Timer::stop() method exists");
        } else {
            DejaGnu.fail("Timer::stop() method doesn't exist");
@@ -97,6 +91,9 @@
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
+#else
+       DejaGnu.note("This class (Timer) is only available in flash9");
+#end
     }
 }
 


reply via email to

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