[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10989: Final test cases with existe
From: |
Bob Naugle |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10989: Final test cases with existence stubs, and modified DejaGnu.hx so gflashplayer will display text for flash8 and lower (needs some work) |
Date: |
Wed, 03 Jun 2009 13:09:37 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10989
committer: Bob Naugle <address@hidden>
branch nick: trunk
timestamp: Wed 2009-06-03 13:09:37 -0600
message:
Final test cases with existence stubs, and modified DejaGnu.hx so
gflashplayer will display text for flash8 and lower (needs some work)
modified:
testsuite/as3/classes.all/DejaGnu.hx
testsuite/as3/classes.all/utils/IDataInput_as.hx
testsuite/as3/classes.all/utils/IDataOutput_as.hx
testsuite/as3/classes.all/utils/IExternalizable_as.hx
=== modified file 'testsuite/as3/classes.all/DejaGnu.hx'
--- a/testsuite/as3/classes.all/DejaGnu.hx 2009-05-20 16:47:49 +0000
+++ b/testsuite/as3/classes.all/DejaGnu.hx 2009-06-03 19:09:37 +0000
@@ -23,6 +23,7 @@
#else
import flash.TextField;
#end
+import haxe.PosInfos;
class DejaGnu {
static var passed = 0;
@@ -31,6 +32,7 @@
static var xfailed = 0;
static var untest = 0;
static var unresolve = 0;
+ static var position:PosInfos;
// This is a trick to force our 'init' function
// to be automatically called at the start of the movie.
@@ -51,6 +53,10 @@
//flash.Lib.current.createTextField("textout", 99, 10, 10, 500, 500);
flash.Lib.current.addChild(tf);
#else
+ flash.Lib._root.createNewTextField("tf",10,0,0,300,300);
+ tf.multiline = true;
+ tf.wordWrap = true;
+ tf.autoSize = "left";
// tf = new flash.TextField();
// tf.autoSize = flash.TextFieldAutoSize.LEFT;
#end
@@ -128,20 +134,40 @@
static function xtrace(msg) {
tf.text += msg + "\n";
+#if flash9
flash.Lib.trace(msg);
+#else
+ untyped flash.Boot.__trace(msg,position);
+#end
}
static function untested(msg) {
+#if flash9
flash.Lib.trace("UNTESTED: "+msg);
+#else
+ untyped flash.Boot.__trace("UNTESTED: "+msg,position);
+#end
}
static function unresolved(msg) {
flash.Lib.trace("UNRESOLVED: "+msg);
+#if flash9
+ flash.Lib.trace("UNRESOLVED: "+msg);
+#else
+ untyped flash.Boot.__trace("UNRESOLVED: "+msg,position);
+#end
}
static public function done() {
printtotals();
- flash.Lib.trace("__END_OF_TEST__");
+#if flash9
+ flash.Lib.trace("__END_OF_TEST__");
+#else
+ untyped flash.Boot.__trace("__END_OF_TEST__",position);
+ //untyped
flash.Boot.__trace(""+flash.Lib._root._width,position);
+ //flash.Lib.current._width = 800;
+#end
+
//loadMovie('fscommand:quit', _root);
}
}
=== modified file 'testsuite/as3/classes.all/utils/IDataInput_as.hx'
--- a/testsuite/as3/classes.all/utils/IDataInput_as.hx 2009-06-02 21:59:41
+0000
+++ b/testsuite/as3/classes.all/utils/IDataInput_as.hx 2009-06-03 19:09:37
+0000
@@ -1,6 +1,6 @@
// IDataInput_as.hx: ActionScript 3 "IDataInput" class, for Gnash.
//
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090603 by "bnaugle". Remove this
// after any hand editing loosing changes.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
@@ -37,105 +37,107 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class IDataInput_as {
static function main() {
- #if !flash9
- DejaGnu.note("this is not a valid test for this version
of flash");
- #end
- #if flash9
+
+#if flash9
// 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(IDataInput.bytesAvailable, Float)) {
- DejaGnu.pass("IDataInput.bytesAvailable property exists");
- } else {
- DejaGnu.fail("IDataInput.bytesAvailable property doesn't exist");
- }
- if (Std.is(IDataInput.endian, String)) {
- DejaGnu.pass("IDataInput.endian property exists");
- } else {
- DejaGnu.fail("IDataInput.endian property doesn't exist");
- }
- if (Std.is(IDataInput.objectEncoding, Float)) {
- DejaGnu.pass("IDataInput.objectEncoding property exists");
- } else {
- DejaGnu.fail("IDataInput.objectEncoding property doesn't exist");
- }
+DejaGnu.note("This class is an interface");
+DejaGnu.note("Implementors: ByteArray, FileStream, Socket, URLStream");
+// if (Std.is(IDataInput.bytesAvailable, Float)) {
+// DejaGnu.pass("IDataInput.bytesAvailable property exists");
+// } else {
+// DejaGnu.fail("IDataInput.bytesAvailable property doesn't exist");
+// }
+// if (Std.is(IDataInput.endian, String)) {
+// DejaGnu.pass("IDataInput.endian property exists");
+// } else {
+// DejaGnu.fail("IDataInput.endian property doesn't exist");
+// }
+// if (Std.is(IDataInput.objectEncoding, Float)) {
+// DejaGnu.pass("IDataInput.objectEncoding property exists");
+// } else {
+// DejaGnu.fail("IDataInput.objectEncoding 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(IDataInput.readBoolean) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readBoolean() method exists");
- } else {
- DejaGnu.fail("IDataInput::readBoolean() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readByte) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readByte() method exists");
- } else {
- DejaGnu.fail("IDataInput::readByte() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readBytes) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readBytes() method exists");
- } else {
- DejaGnu.fail("IDataInput::readBytes() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readDouble) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readDouble() method exists");
- } else {
- DejaGnu.fail("IDataInput::readDouble() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readFloat) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readFloat() method exists");
- } else {
- DejaGnu.fail("IDataInput::readFloat() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readInt) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readInt() method exists");
- } else {
- DejaGnu.fail("IDataInput::readInt() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readMultiByte) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readMultiByte() method exists");
- } else {
- DejaGnu.fail("IDataInput::readMultiByte() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readObject) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readObject() method exists");
- } else {
- DejaGnu.fail("IDataInput::readObject() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readShort) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readShort() method exists");
- } else {
- DejaGnu.fail("IDataInput::readShort() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readUnsignedByte) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readUnsignedByte() method exists");
- } else {
- DejaGnu.fail("IDataInput::readUnsignedByte() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readUnsignedInt) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readUnsignedInt() method exists");
- } else {
- DejaGnu.fail("IDataInput::readUnsignedInt() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readUnsignedShort) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readUnsignedShort() method exists");
- } else {
- DejaGnu.fail("IDataInput::readUnsignedShort() method doesn't
exist");
- }
- if (Type.typeof(IDataInput.readUTF) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readUTF() method exists");
- } else {
- DejaGnu.fail("IDataInput::readUTF() method doesn't exist");
- }
- if (Type.typeof(IDataInput.readUTFBytes) == ValueType.TFunction) {
- DejaGnu.pass("IDataInput::readUTFBytes() method exists");
- } else {
- DejaGnu.fail("IDataInput::readUTFBytes() method doesn't exist");
- }
- #end
+// if (Type.typeof(IDataInput.readBoolean) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readBoolean() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readBoolean() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readByte) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readByte() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readByte() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readBytes) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readBytes() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readBytes() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readDouble) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readDouble() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readDouble() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readFloat) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readFloat() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readFloat() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readInt) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readInt() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readInt() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readMultiByte) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readMultiByte() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readMultiByte() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readObject) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readObject() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readObject() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readShort) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readShort() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readShort() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readUnsignedByte) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readUnsignedByte() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readUnsignedByte() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readUnsignedInt) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readUnsignedInt() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readUnsignedInt() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readUnsignedShort) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readUnsignedShort() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readUnsignedShort() method doesn't
exist");
+// }
+// if (Type.typeof(IDataInput.readUTF) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readUTF() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readUTF() method doesn't exist");
+// }
+// if (Type.typeof(IDataInput.readUTFBytes) == ValueType.TFunction) {
+// DejaGnu.pass("IDataInput::readUTFBytes() method exists");
+// } else {
+// DejaGnu.fail("IDataInput::readUTFBytes() method doesn't exist");
+// }
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
+#else
+ DejaGnu.note("This class (IDataInput) is only available in flash9");
+#end
}
}
=== modified file 'testsuite/as3/classes.all/utils/IDataOutput_as.hx'
--- a/testsuite/as3/classes.all/utils/IDataOutput_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/utils/IDataOutput_as.hx 2009-06-03 19:09:37
+0000
@@ -26,9 +26,6 @@
#if flash9
import flash.utils.IDataOutput;
import flash.display.MovieClip;
-#else
-import flash.IDataOutput;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
@@ -39,94 +36,92 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class IDataOutput_as {
static function main() {
- var x1:IDataOutput = new IDataOutput();
-
- // Make sure we actually get a valid class
- if (x1 != null) {
- DejaGnu.pass("IDataOutput class exists");
- } else {
- DejaGnu.fail("IDataOutput class doesn't exist");
- }
+#if flash9
+DejaGnu.note("This class is an interface");
+DejaGnu.note("Implementors: ByteArray, FileStream, Socket");
// 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.endian == null) {
- DejaGnu.pass("IDataOutput.endian property exists");
- } else {
- DejaGnu.fail("IDataOutput.endian property doesn't exist");
- }
- if (x1.objectEncoding == uint) {
- DejaGnu.pass("IDataOutput.objectEncoding property exists");
- } else {
- DejaGnu.fail("IDataOutput.objectEncoding property doesn't exist");
- }
+// if (x1.endian == null) {
+// DejaGnu.pass("IDataOutput.endian property exists");
+// } else {
+// DejaGnu.fail("IDataOutput.endian property doesn't exist");
+// }
+// if (x1.objectEncoding == uint) {
+// DejaGnu.pass("IDataOutput.objectEncoding property exists");
+// } else {
+// DejaGnu.fail("IDataOutput.objectEncoding 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.writeBoolean == null) {
- DejaGnu.pass("IDataOutput::writeBoolean() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeBoolean() method doesn't exist");
- }
- if (x1.writeByte == null) {
- DejaGnu.pass("IDataOutput::writeByte() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeByte() method doesn't exist");
- }
- if (x1.writeBytes == null) {
- DejaGnu.pass("IDataOutput::writeBytes() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeBytes() method doesn't exist");
- }
- if (x1.writeDouble == null) {
- DejaGnu.pass("IDataOutput::writeDouble() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeDouble() method doesn't exist");
- }
- if (x1.writeFloat == null) {
- DejaGnu.pass("IDataOutput::writeFloat() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeFloat() method doesn't exist");
- }
- if (x1.writeInt == null) {
- DejaGnu.pass("IDataOutput::writeInt() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeInt() method doesn't exist");
- }
- if (x1.writeMultiByte == null) {
- DejaGnu.pass("IDataOutput::writeMultiByte() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeMultiByte() method doesn't exist");
- }
- if (x1.writeObject == null) {
- DejaGnu.pass("IDataOutput::writeObject() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeObject() method doesn't exist");
- }
- if (x1.writeShort == null) {
- DejaGnu.pass("IDataOutput::writeShort() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeShort() method doesn't exist");
- }
- if (x1.writeUnsignedInt == null) {
- DejaGnu.pass("IDataOutput::writeUnsignedInt() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeUnsignedInt() method doesn't
exist");
- }
- if (x1.writeUTF == null) {
- DejaGnu.pass("IDataOutput::writeUTF() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeUTF() method doesn't exist");
- }
- if (x1.writeUTFBytes == null) {
- DejaGnu.pass("IDataOutput::writeUTFBytes() method exists");
- } else {
- DejaGnu.fail("IDataOutput::writeUTFBytes() method doesn't exist");
- }
+// if (x1.writeBoolean == null) {
+// DejaGnu.pass("IDataOutput::writeBoolean() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeBoolean() method doesn't exist");
+// }
+// if (x1.writeByte == null) {
+// DejaGnu.pass("IDataOutput::writeByte() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeByte() method doesn't exist");
+// }
+// if (x1.writeBytes == null) {
+// DejaGnu.pass("IDataOutput::writeBytes() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeBytes() method doesn't exist");
+// }
+// if (x1.writeDouble == null) {
+// DejaGnu.pass("IDataOutput::writeDouble() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeDouble() method doesn't exist");
+// }
+// if (x1.writeFloat == null) {
+// DejaGnu.pass("IDataOutput::writeFloat() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeFloat() method doesn't exist");
+// }
+// if (x1.writeInt == null) {
+// DejaGnu.pass("IDataOutput::writeInt() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeInt() method doesn't exist");
+// }
+// if (x1.writeMultiByte == null) {
+// DejaGnu.pass("IDataOutput::writeMultiByte() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeMultiByte() method doesn't exist");
+// }
+// if (x1.writeObject == null) {
+// DejaGnu.pass("IDataOutput::writeObject() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeObject() method doesn't exist");
+// }
+// if (x1.writeShort == null) {
+// DejaGnu.pass("IDataOutput::writeShort() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeShort() method doesn't exist");
+// }
+// if (x1.writeUnsignedInt == null) {
+// DejaGnu.pass("IDataOutput::writeUnsignedInt() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeUnsignedInt() method doesn't
exist");
+// }
+// if (x1.writeUTF == null) {
+// DejaGnu.pass("IDataOutput::writeUTF() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeUTF() method doesn't exist");
+// }
+// if (x1.writeUTFBytes == null) {
+// DejaGnu.pass("IDataOutput::writeUTFBytes() method exists");
+// } else {
+// DejaGnu.fail("IDataOutput::writeUTFBytes() method doesn't exist");
+// }
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
+#else
+ DejaGnu.note("This class (IDataOutput) is only available in flash9");
+#end
}
}
=== modified file 'testsuite/as3/classes.all/utils/IExternalizable_as.hx'
--- a/testsuite/as3/classes.all/utils/IExternalizable_as.hx 2009-05-21
00:17:43 +0000
+++ b/testsuite/as3/classes.all/utils/IExternalizable_as.hx 2009-06-03
19:09:37 +0000
@@ -1,6 +1,6 @@
// IExternalizable_as.hx: ActionScript 3 "IExternalizable" class, for Gnash.
//
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090603 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.IExternalizable;
import flash.display.MovieClip;
-#else
-import flash.IExternalizable;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,14 +37,10 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class IExternalizable_as {
static function main() {
- var x1:IExternalizable = new IExternalizable();
-
+#if flash9
+DejaGnu.note("This class is an interface");
+DejaGnu.note("Implementors: ");
// Make sure we actually get a valid class
- if (x1 != null) {
- DejaGnu.pass("IExternalizable class exists");
- } else {
- DejaGnu.fail("IExternalizable 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
@@ -54,6 +48,9 @@
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
+#else
+ DejaGnu.note("This class (IExternalizable) is only available in
flash9");
+#end
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10989: Final test cases with existence stubs, and modified DejaGnu.hx so gflashplayer will display text for flash8 and lower (needs some work),
Bob Naugle <=