[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10975: finished several as3 net tes
From: |
Ben Limmer |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10975: finished several as3 net testsuites |
Date: |
Tue, 02 Jun 2009 16:04:07 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10975
committer: Ben Limmer <address@hidden>
branch nick: trunk
timestamp: Tue 2009-06-02 16:04:07 -0600
message:
finished several as3 net testsuites
modified:
testsuite/as3/classes.all/net/NetConnection_as.hx
testsuite/as3/classes.all/net/ObjectEncoding_as.hx
testsuite/as3/classes.all/net/URLRequestHeader_as.hx
testsuite/as3/classes.all/net/URLRequestMethod_as.hx
testsuite/as3/classes.all/net/URLRequest_as.hx
testsuite/as3/classes.all/utils/IDataInput_as.hx
------------------------------------------------------------
revno: 10952.1.7
committer: Ben Limmer <address@hidden>
branch nick: branch_2
timestamp: Tue 2009-06-02 15:59:41 -0600
message:
updated net as3 testsuites
modified:
testsuite/as3/classes.all/net/NetConnection_as.hx
testsuite/as3/classes.all/net/ObjectEncoding_as.hx
testsuite/as3/classes.all/net/URLRequestHeader_as.hx
testsuite/as3/classes.all/net/URLRequestMethod_as.hx
testsuite/as3/classes.all/net/URLRequest_as.hx
testsuite/as3/classes.all/utils/IDataInput_as.hx
=== modified file 'testsuite/as3/classes.all/net/NetConnection_as.hx'
--- a/testsuite/as3/classes.all/net/NetConnection_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/net/NetConnection_as.hx 2009-06-02 21:59:41
+0000
@@ -32,6 +32,7 @@
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,83 +40,107 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class NetConnection_as {
static function main() {
- var x1:NetConnection = new NetConnection();
+ #if flash9
+ DejaGnu.note("NOTE: this test is not currently working with
Adobe Flash v.9");
+ DejaGnu.note(" due to new security regulations in flash 9.
we need to have");
+ DejaGnu.note(" a server we can check this against to
ensure netconnect works");
+ #end
+ //var x1:NetConnection = new NetConnection();
+ //x1.connect("http://ubuntu");
// Make sure we actually get a valid class
- if (x1 != null) {
- DejaGnu.pass("NetConnection class exists");
- } else {
- DejaGnu.fail("NetConnection class doesn't exist");
- }
+ //if (x1 != null) {
+ // DejaGnu.pass("NetConnection class exists");
+ //} else {
+ // DejaGnu.fail("NetConnection 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.client == Object) {
-// DejaGnu.pass("NetConnection.client property exists");
-// } else {
-// DejaGnu.fail("NetConnection.client property doesn't exist");
-// }
- if (x1.connected == false) {
- DejaGnu.pass("NetConnection.connected property exists");
- } else {
- DejaGnu.fail("NetConnection.connected property doesn't exist");
- }
- if (x1.connectedProxyType == null) {
- DejaGnu.pass("NetConnection.connectedProxyType property exists");
- } else {
- DejaGnu.fail("NetConnection.connectedProxyType property doesn't
exist");
- }
+ //if (Type.typeof(x1.client) == ValueType.TObject) {
+ // DejaGnu.pass("NetConnection.client property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.client property doesn't exist");
+ //}
+ //if (Std.is(x1.connected, Bool)) {
+ // DejaGnu.pass("NetConnection.connected property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.connected property doesn't exist");
+ //}
+ //may need to be null
+ //if (Std.is(x1.connectedProxyType, String)) {
+ // DejaGnu.pass("NetConnection.connectedProxyType property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.connectedProxyType property doesn't
exist");
+ //}
// FIXME: Cannot access static field defaultObjectEncoding from a class
instance
// if (x1.defaultObjectEncoding == 0) {
// DejaGnu.pass("NetConnection.defaultObjectEncoding property exists");
// } else {
// DejaGnu.fail("NetConnection.defaultObjectEncoding property doesn't
exist");
// }
- if (x1.objectEncoding == 0) {
- DejaGnu.pass("NetConnection.objectEncoding property exists");
- } else {
- DejaGnu.fail("NetConnection.objectEncoding property doesn't exist");
- }
- if (x1.proxyType == null) {
- DejaGnu.pass("NetConnection.proxyType property exists");
- } else {
- DejaGnu.fail("NetConnection.proxyType property doesn't exist");
- }
- if (x1.uri == null) {
- DejaGnu.pass("NetConnection.uri property exists");
- } else {
- DejaGnu.fail("NetConnection.uri property doesn't exist");
- }
- if (x1.usingTLS == false) {
- DejaGnu.pass("NetConnection.usingTLS property exists");
- } else {
- DejaGnu.fail("NetConnection.usingTLS property doesn't exist");
- }
+ //if (Std.is(x1.objectEncoding, Float)) {
+ // DejaGnu.pass("NetConnection.objectEncoding property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.objectEncoding property doesn't
exist");
+ //}
+ //if (Std.is(x1.proxyType, String)) {
+ // DejaGnu.pass("NetConnection.proxyType property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.proxyType property doesn't exist");
+ //}
+ //if (Std.is(x1.uri, String)) {
+ // DejaGnu.pass("NetConnection.uri property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.uri property doesn't exist");
+ //}
+ //if (Std.is(x1.usingTLS, Bool)) {
+ // DejaGnu.pass("NetConnection.usingTLS property exists");
+ //} else {
+ // DejaGnu.fail("NetConnection.usingTLS 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.addHeader == null) {
- DejaGnu.pass("NetConnection::addHeader() method exists");
- } else {
- DejaGnu.fail("NetConnection::addHeader() method doesn't exist");
- }
- if (x1.call == null) {
- DejaGnu.pass("NetConnection::call() method exists");
- } else {
- DejaGnu.fail("NetConnection::call() method doesn't exist");
- }
- if (x1.close == null) {
- DejaGnu.pass("NetConnection::close() method exists");
- } else {
- DejaGnu.fail("NetConnection::close() method doesn't exist");
- }
- if (x1.connect == null) {
- DejaGnu.pass("NetConnection::connect() method exists");
- } else {
- DejaGnu.fail("NetConnection::connect() method doesn't exist");
- }
-
+ //if (Type.typeof(x1.addHeader) == ValueType.TFunction) {
+ // DejaGnu.pass("NetConnection::addHeader() method exists");
+ //} else {
+ // DejaGnu.fail("NetConnection::addHeader() method doesn't exist");
+ //}
+ //if (Type.typeof(x1.call) == ValueType.TFunction) {
+ // DejaGnu.pass("NetConnection::call() method exists");
+ //} else {
+ // DejaGnu.fail("NetConnection::call() method doesn't exist");
+ //}
+ //if (Type.typeof(x1.close) == ValueType.TFunction) {
+ // DejaGnu.pass("NetConnection::close() method exists");
+ //} else {
+ // DejaGnu.fail("NetConnection::close() method doesn't exist");
+ //}
+ //if (Type.typeof(x1.connect) == ValueType.TFunction) {
+ // DejaGnu.pass("NetConnection::connect() method exists");
+ //} else {
+ // DejaGnu.fail("NetConnection::connect() method doesn't exist");
+ //}
+ #if (flash7 || flash8)
+ DejaGnu.note("this test requires that localhost:80 is open to
connect to, use Apache");
+
+ var x2:NetConnection = new NetConnection();
+
+ // Make sure we actually get a valid class
+ if (x2 != null) {
+ DejaGnu.pass("NetConnection class exists");
+ } else {
+ DejaGnu.fail("NetConnection class doesn't exist");
+ }
+ if(x2.connect("http://localhost:80") == false) {
+ DejaGnu.pass("NetConnection::connect successful!");
+ } else {
+ DejaGnu.fail("NetConnection::connect failed! (do you
have localhost:80 open?)");
+ }
+
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
=== modified file 'testsuite/as3/classes.all/net/ObjectEncoding_as.hx'
--- a/testsuite/as3/classes.all/net/ObjectEncoding_as.hx 2009-05-21
00:17:43 +0000
+++ b/testsuite/as3/classes.all/net/ObjectEncoding_as.hx 2009-06-02
21:59:41 +0000
@@ -26,12 +26,10 @@
#if flash9
import flash.net.ObjectEncoding;
import flash.display.MovieClip;
-#else
-import flash.ObjectEncoding;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,8 +37,10 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class ObjectEncoding_as {
static function main() {
- // Make sure we actually get a valid class
-
+ #if !flash9
+ DejaGnu.note("this test is not valid for this version of
flash.");
+ #end
+ #if flash9
// 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.
@@ -49,17 +49,17 @@
} else {
DejaGnu.fail("ObjectEncoding::AMF0() constant doesn't exist");
}
- if (ObjectEncoding.AMF3 == 0) {
+ if (ObjectEncoding.AMF3 == 3) {
DejaGnu.pass("ObjectEncoding::AMF3() constant exists");
} else {
DejaGnu.fail("ObjectEncoding::AMF3() constant doesn't exist");
}
- if (ObjectEncoding.DEFAULT == 0) {
+ if (ObjectEncoding.DEFAULT == 3) {
DejaGnu.pass("ObjectEncoding::DEFAULT() constant exists");
} else {
DejaGnu.fail("ObjectEncoding::DEFAULT() constant doesn't exist");
}
-
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
=== modified file 'testsuite/as3/classes.all/net/URLRequestHeader_as.hx'
--- a/testsuite/as3/classes.all/net/URLRequestHeader_as.hx 2009-05-21
00:17:43 +0000
+++ b/testsuite/as3/classes.all/net/URLRequestHeader_as.hx 2009-06-02
21:59:41 +0000
@@ -26,12 +26,10 @@
#if flash9
import flash.net.URLRequestHeader;
import flash.display.MovieClip;
-#else
-import flash.URLRequestHeader;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,7 +37,11 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class URLRequestHeader_as {
static function main() {
- var x1:URLRequestHeader = new URLRequestHeader();
+ #if !flash9
+ DejaGnu.note("this test is not valid with this version
of flash");
+ #end
+ #if flash9
+ var x1:URLRequestHeader = new URLRequestHeader("Test Name",
"Test Value");
// Make sure we actually get a valid class
if (x1 != null) {
@@ -50,17 +52,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.name == null) {
+ if (Std.is(x1.name, String) && (Std.string(x1.name) == "Test Name")) {
DejaGnu.pass("URLRequestHeader.name property exists");
} else {
DejaGnu.fail("URLRequestHeader.name property doesn't exist");
}
- if (x1.value == null) {
+ if (Std.is(x1.value, String) && (Std.string(x1.value) == "Test Value"))
{
DejaGnu.pass("URLRequestHeader.value property exists");
} else {
DejaGnu.fail("URLRequestHeader.value property doesn't exist");
}
-
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
=== modified file 'testsuite/as3/classes.all/net/URLRequestMethod_as.hx'
--- a/testsuite/as3/classes.all/net/URLRequestMethod_as.hx 2009-05-21
00:17:43 +0000
+++ b/testsuite/as3/classes.all/net/URLRequestMethod_as.hx 2009-06-02
21:59:41 +0000
@@ -26,12 +26,10 @@
#if flash9
import flash.net.URLRequestMethod;
import flash.display.MovieClip;
-#else
-import flash.URLRequestMethod;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,16 +37,19 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class URLRequestMethod_as {
static function main() {
-
+ #if !flash9
+ DejaGnu.note("this is not valid for this version of flash");
+ #end
+ #if flash9
// Make sure we actually get a valid class
-// FIXME: commented out constants are all AIR only
+// FIXME: commented out constants are all AIR only (not implemented in
haxe)
// if (URLRequestMethod.DELETE != null) {
// DejaGnu.pass("URLRequestMethod.DELETE constant exists");
// } else {
// DejaGnu.fail("URLRequestMethod.DELETE constant doesn't exist");
// }
- if (URLRequestMethod.GET != null) {
+ if (Std.string(URLRequestMethod.GET) == "GET") {
DejaGnu.pass("URLRequestMethod.GET constant exists");
} else {
DejaGnu.fail("URLRequestMethod.GET constant doesn't exist");
@@ -66,7 +67,7 @@
// DejaGnu.fail("URLRequestMethod.OPTIONS constant doesn't exist");
// }
- if (URLRequestMethod.POST != null) {
+ if (Std.string(URLRequestMethod.POST) == "POST") {
DejaGnu.pass("URLRequestMethod.POST constant exists");
} else {
DejaGnu.fail("URLRequestMethod.POST constant doesn't exist");
@@ -77,7 +78,7 @@
// } else {
// DejaGnu.fail("URLRequestMethod.PUT constant doesn't exist");
// }
-
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
=== modified file 'testsuite/as3/classes.all/net/URLRequest_as.hx'
--- a/testsuite/as3/classes.all/net/URLRequest_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/net/URLRequest_as.hx 2009-06-02 21:59:41
+0000
@@ -26,12 +26,10 @@
#if flash9
import flash.net.URLRequest;
import flash.display.MovieClip;
-#else
-import flash.URLRequest;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,7 +37,11 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class URLRequest_as {
static function main() {
- var x1:URLRequest = new URLRequest();
+ #if !flash9
+ DejaGnu.note("this test does not apply to this version
of flash");
+ #end
+ #if flash9
+ var x1:URLRequest = new URLRequest("http://www.google.com");
// Make sure we actually get a valid class
if (x1 != null) {
@@ -50,70 +52,67 @@
// 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.
-
-// FIXME: commented out constants are all AIR only
- // if (x1.authenticate == false) {
+ //unimplemented in haxe (AIR only)
+// if (Std.is(x1.authenticate, Bool)) {
// DejaGnu.pass("URLRequest.authenticate property exists");
// } else {
// DejaGnu.fail("URLRequest.authenticate property doesn't exist");
// }
-// if (x1.cacheResponse == false) {
+// if (Std.is(x1.cacheResponse, Bool)) {
// DejaGnu.pass("URLRequest.cacheResponse property exists");
// } else {
// DejaGnu.fail("URLRequest.cacheResponse property doesn't exist");
// }
+ //these should be changed away from null once the class is implemented
+ //to be the true content type and desired data to be pulled.
if (x1.contentType == null) {
DejaGnu.pass("URLRequest.contentType property exists");
} else {
DejaGnu.fail("URLRequest.contentType property doesn't exist");
}
-// if (x1.data == Object) {
-// DejaGnu.pass("URLRequest.data property exists");
-// } else {
-// DejaGnu.fail("URLRequest.data property doesn't exist");
-// }
- if (x1.digest == null) {
- DejaGnu.pass("URLRequest.digest property exists");
- } else {
- DejaGnu.fail("URLRequest.digest property doesn't exist");
- }
-// if (x1.followRedirects == false) {
-// DejaGnu.pass("URLRequest.followRedirects property exists");
-// } else {
-// DejaGnu.fail("URLRequest.followRedirects property doesn't exist");
-// }
-// if (x1.manageCookies == false) {
-// DejaGnu.pass("URLRequest.manageCookies property exists");
-// } else {
-// DejaGnu.fail("URLRequest.manageCookies property doesn't exist");
-// }
- if (x1.method == null) {
+ if (x1.data == null) {
+ DejaGnu.pass("URLRequest.data property exists");
+ } else {
+ DejaGnu.fail("URLRequest.data property doesn't exist");
+ }
+ //unimplemented in haxe (AIR only)
+ //if (Std.is(x1.followRedirects, Bool)) {
+ // DejaGnu.pass("URLRequest.followRedirects property exists");
+ //} else {
+ // DejaGnu.fail("URLRequest.followRedirects property doesn't exist");
+ //}
+ //if (Std.is(x1.manageCookies, Bool)) {
+ // DejaGnu.pass("URLRequest.manageCookies property exists");
+ //} else {
+ // DejaGnu.fail("URLRequest.manageCookies property doesn't exist");
+ //}
+ if (Std.is(x1.method, String)) {
DejaGnu.pass("URLRequest.method property exists");
} else {
DejaGnu.fail("URLRequest.method property doesn't exist");
}
-// FIXME: returns an array
-// if (x1.requestHeaders == 0) {
-// DejaGnu.pass("URLRequest.requestHeaders property exists");
-// } else {
-// DejaGnu.fail("URLRequest.requestHeaders property doesn't exist");
-// }
- if (x1.url == null) {
+ if (Std.is(x1.requestHeaders, Array)) {
+ DejaGnu.pass("URLRequest.requestHeaders property exists");
+ } else {
+ DejaGnu.fail("URLRequest.requestHeaders property doesn't exist");
+ }
+ if (Std.is(x1.url, String)) {
DejaGnu.pass("URLRequest.url property exists");
} else {
DejaGnu.fail("URLRequest.url property doesn't exist");
}
-// if (x1.useCache == false) {
-// DejaGnu.pass("URLRequest.useCache property exists");
-// } else {
-// DejaGnu.fail("URLRequest.useCache property doesn't exist");
-// }
-// if (x1.userAgent == null) {
-// DejaGnu.pass("URLRequest.userAgent property exists");
-// } else {
-// DejaGnu.fail("URLRequest.userAgent property doesn't exist");
-// }
-
+ //unimplemented in haxe (AIR only)
+ //if (Std.is(x1.useCache, Bool)) {
+ // DejaGnu.pass("URLRequest.useCache property exists");
+ //} else {
+ // DejaGnu.fail("URLRequest.useCache property doesn't exist");
+ //}
+ //if (Std.is(x1.userAgent, String)) {
+ // DejaGnu.pass("URLRequest.userAgent property exists");
+ //} else {
+ // DejaGnu.fail("URLRequest.userAgent property doesn't exist");
+ //}
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
=== modified file 'testsuite/as3/classes.all/utils/IDataInput_as.hx'
--- a/testsuite/as3/classes.all/utils/IDataInput_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/utils/IDataInput_as.hx 2009-06-02 21:59:41
+0000
@@ -26,12 +26,10 @@
#if flash9
import flash.utils.IDataInput;
import flash.display.MovieClip;
-#else
-import flash.IDataInput;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,28 +37,24 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class IDataInput_as {
static function main() {
- var x1:IDataInput = new IDataInput();
-
- // Make sure we actually get a valid class
- if (x1 != null) {
- DejaGnu.pass("IDataInput class exists");
- } else {
- DejaGnu.fail("IDataInput class doesn't exist");
- }
+ #if !flash9
+ DejaGnu.note("this is not a valid test for this version
of flash");
+ #end
+ #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 (x1.bytesAvailable == uint) {
+ if (Std.is(IDataInput.bytesAvailable, Float)) {
DejaGnu.pass("IDataInput.bytesAvailable property exists");
} else {
DejaGnu.fail("IDataInput.bytesAvailable property doesn't exist");
}
- if (x1.endian == null) {
+ if (Std.is(IDataInput.endian, String)) {
DejaGnu.pass("IDataInput.endian property exists");
} else {
DejaGnu.fail("IDataInput.endian property doesn't exist");
}
- if (x1.objectEncoding == uint) {
+ if (Std.is(IDataInput.objectEncoding, Float)) {
DejaGnu.pass("IDataInput.objectEncoding property exists");
} else {
DejaGnu.fail("IDataInput.objectEncoding property doesn't exist");
@@ -69,77 +63,77 @@
// 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.readBoolean == false) {
+ if (Type.typeof(IDataInput.readBoolean) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readBoolean() method exists");
} else {
DejaGnu.fail("IDataInput::readBoolean() method doesn't exist");
}
- if (x1.readByte == 0) {
+ if (Type.typeof(IDataInput.readByte) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readByte() method exists");
} else {
DejaGnu.fail("IDataInput::readByte() method doesn't exist");
}
- if (x1.readBytes == null) {
+ if (Type.typeof(IDataInput.readBytes) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readBytes() method exists");
} else {
DejaGnu.fail("IDataInput::readBytes() method doesn't exist");
}
- if (x1.readDouble == 0) {
+ if (Type.typeof(IDataInput.readDouble) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readDouble() method exists");
} else {
DejaGnu.fail("IDataInput::readDouble() method doesn't exist");
}
- if (x1.readFloat == 0) {
+ if (Type.typeof(IDataInput.readFloat) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readFloat() method exists");
} else {
DejaGnu.fail("IDataInput::readFloat() method doesn't exist");
}
- if (x1.readInt == 0) {
+ if (Type.typeof(IDataInput.readInt) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readInt() method exists");
} else {
DejaGnu.fail("IDataInput::readInt() method doesn't exist");
}
- if (x1.readMultiByte == null) {
+ if (Type.typeof(IDataInput.readMultiByte) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readMultiByte() method exists");
} else {
DejaGnu.fail("IDataInput::readMultiByte() method doesn't exist");
}
- if (x1.readObject == *) {
+ if (Type.typeof(IDataInput.readObject) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readObject() method exists");
} else {
DejaGnu.fail("IDataInput::readObject() method doesn't exist");
}
- if (x1.readShort == 0) {
+ if (Type.typeof(IDataInput.readShort) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readShort() method exists");
} else {
DejaGnu.fail("IDataInput::readShort() method doesn't exist");
}
- if (x1.readUnsignedByte == 0) {
+ if (Type.typeof(IDataInput.readUnsignedByte) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readUnsignedByte() method exists");
} else {
DejaGnu.fail("IDataInput::readUnsignedByte() method doesn't exist");
}
- if (x1.readUnsignedInt == 0) {
+ if (Type.typeof(IDataInput.readUnsignedInt) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readUnsignedInt() method exists");
} else {
DejaGnu.fail("IDataInput::readUnsignedInt() method doesn't exist");
}
- if (x1.readUnsignedShort == 0) {
+ if (Type.typeof(IDataInput.readUnsignedShort) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readUnsignedShort() method exists");
} else {
DejaGnu.fail("IDataInput::readUnsignedShort() method doesn't
exist");
}
- if (x1.readUTF == null) {
+ if (Type.typeof(IDataInput.readUTF) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readUTF() method exists");
} else {
DejaGnu.fail("IDataInput::readUTF() method doesn't exist");
}
- if (x1.readUTFBytes == null) {
+ if (Type.typeof(IDataInput.readUTFBytes) == ValueType.TFunction) {
DejaGnu.pass("IDataInput::readUTFBytes() method exists");
} else {
DejaGnu.fail("IDataInput::readUTFBytes() method doesn't exist");
}
-
+ #end
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10975: finished several as3 net testsuites,
Ben Limmer <=