[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10944: Modified Test Cases (Point,
From: |
Bob Naugle |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10944: Modified Test Cases (Point, Rectangle, SharedObject) |
Date: |
Thu, 28 May 2009 10:29:08 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10944
committer: Bob Naugle <address@hidden>
branch nick: trunk
timestamp: Thu 2009-05-28 10:29:08 -0600
message:
Modified Test Cases (Point, Rectangle, SharedObject)
modified:
testsuite/as3/classes.all/geom/Point_as.hx
testsuite/as3/classes.all/geom/Rectangle_as.hx
testsuite/as3/classes.all/net/SharedObject_as.hx
------------------------------------------------------------
revno: 10930.1.1
committer: Bob Naugle <address@hidden>
branch nick: development
timestamp: Thu 2009-05-28 10:25:59 -0600
message:
Modified test cases (Point, Rectangle, SharedObject)
modified:
testsuite/as3/classes.all/geom/Point_as.hx
testsuite/as3/classes.all/geom/Rectangle_as.hx
testsuite/as3/classes.all/net/SharedObject_as.hx
=== modified file 'testsuite/as3/classes.all/geom/Point_as.hx'
--- a/testsuite/as3/classes.all/geom/Point_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/geom/Point_as.hx 2009-05-28 16:25:59
+0000
@@ -1,6 +1,6 @@
// Point_as.hx: ActionScript 3 "Point" class, for Gnash.
//
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090528 by "bnaugle". Remove this
// after any hand editing loosing changes.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
@@ -24,12 +24,11 @@
// DejaGnu.hx header file for the testing framework support.
#if flash9
-import flash.geom.Point;
import flash.display.MovieClip;
#else
-import flash.Point;
import flash.MovieClip;
#end
+import flash.geom.Point;
import flash.Lib;
import Type;
@@ -39,92 +38,99 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class Point_as {
static function main() {
- var x1:Point = new Point();
-
- // Make sure we actually get a valid class
- if (x1 != null) {
- DejaGnu.pass("Point class exists");
- } else {
- DejaGnu.fail("Point class doesn't exist");
- }
+#if flash9
+ var x1:Point = new Point();
+ if (x1 != null) {
+ DejaGnu.pass("Point class exists");
+ } else {
+ DejaGnu.fail("Point class doesn't exist");
+ }
+#else
+ var x1:Point<Int> = new Point(0,0);
+ if (Type.typeof(x1) == ValueType.TObject) {
+ DejaGnu.pass("Point class exists");
+ } else {
+ DejaGnu.fail("Point class doesn't exist");
+ }
+#end
// 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.length == 0) {
+ if (Type.typeof(x1.length) == ValueType.TInt) {
DejaGnu.pass("Point.length property exists");
} else {
DejaGnu.fail("Point.length property doesn't exist");
}
- if (x1.x == 0) {
+ if (Type.typeof(x1.x) == ValueType.TInt) {
DejaGnu.pass("Point.x property exists");
} else {
DejaGnu.fail("Point.x property doesn't exist");
}
- if (x1.y == 0) {
+ if (Type.typeof(x1.y) == ValueType.TInt) {
DejaGnu.pass("Point.y property exists");
} else {
DejaGnu.fail("Point.y property doesn't exist");
}
-
// Tests to see if all the methods exist. All these do is test for
// existance of a method, and don't test the functionality at all. This
// is primarily useful only to test completeness of the API implementation.
-// if (x1.add == Point) {
-// DejaGnu.pass("Point::add() method exists");
-// } else {
-// DejaGnu.fail("Point::add() method doesn't exist");
-// }
-// if (x1.clone == Point) {
-// DejaGnu.pass("Point::clone() method exists");
-// } else {
-// DejaGnu.fail("Point::clone() method doesn't exist");
-// }
-// if (Point.distance == 0) {
-// DejaGnu.pass("Point::distance() method exists");
-// } else {
-// DejaGnu.fail("Point::distance() method doesn't exist");
-// }
-// if (x1.equals == Point) {
-// DejaGnu.pass("Point::equals() method exists");
-// } else {
-// DejaGnu.fail("Point::equals() method doesn't exist");
-// }
-// if (x1.interpolate == Point) {
-// DejaGnu.pass("Point::interpolate() method exists");
-// } else {
-// DejaGnu.fail("Point::interpolate() method doesn't exist");
-// }
- if (x1.normalize == null) {
+ if (Type.typeof(x1.normalize) == ValueType.TFunction) {
DejaGnu.pass("Point::normalize() method exists");
} else {
DejaGnu.fail("Point::normalize() method doesn't exist");
}
- if (x1.offset == null) {
+ if (Type.typeof(x1.offset) == ValueType.TFunction) {
DejaGnu.pass("Point::offset() method exists");
} else {
DejaGnu.fail("Point::offset() method doesn't exist");
}
-// if (x1.polar == Point) {
-// DejaGnu.pass("Point::polar() method exists");
-// } else {
-// DejaGnu.fail("Point::polar() method doesn't exist");
-// }
-// if (x1.subtract == Point) {
-// DejaGnu.pass("Point::subtract() method exists");
-// } else {
-// DejaGnu.fail("Point::subtract() method doesn't exist");
-// }
- if (x1.toString == null) {
+ if (Type.typeof(x1.toString) == ValueType.TFunction) {
DejaGnu.pass("Point::toString() method exists");
} else {
DejaGnu.fail("Point::toString() method doesn't exist");
}
-
+ if (Type.typeof(x1.add) == ValueType.TFunction) {
+ DejaGnu.pass("Point::add() method exists");
+ } else {
+ DejaGnu.fail("Point::add() method doesn't exist");
+ }
+ if (Type.typeof(x1.clone) == ValueType.TFunction) {
+ DejaGnu.pass("Point::clone() method exists");
+ } else {
+ DejaGnu.fail("Point::clone() method doesn't exist");
+ }
+ if (Type.typeof(x1.equals) == ValueType.TFunction) {
+ DejaGnu.pass("Point::equals() method exists");
+ } else {
+ DejaGnu.fail("Point::equals() method doesn't exist");
+ }
+ if (Type.typeof(x1.subtract) == ValueType.TFunction) {
+ DejaGnu.pass("Point::subtract() method exists");
+ } else {
+ DejaGnu.fail("Point::subtract() method doesn't exist");
+ }
+ if (Type.typeof(Point.polar) == ValueType.TFunction) {
+ DejaGnu.pass("Point::polar() method exists");
+ } else {
+ DejaGnu.fail("Point::polar() method doesn't exist");
+ }
+ if (Type.typeof(Point.interpolate) == ValueType.TFunction) {
+ DejaGnu.pass("Point::interpolate() method exists");
+ } else {
+ DejaGnu.fail("Point::interpolate() method doesn't exist");
+ }
+ if (Type.typeof(Point.distance) == ValueType.TFunction) {
+ DejaGnu.pass("Point::distance() method exists");
+ } else {
+ DejaGnu.fail("Point::distance() method doesn't exist");
+ }
// Call this after finishing all tests. It prints out the totals.
- DejaGnu.done();
+ DejaGnu.done();
}
}
+
+
// local Variables:
// mode: C++
// indent-tabs-mode: t
=== modified file 'testsuite/as3/classes.all/geom/Rectangle_as.hx'
--- a/testsuite/as3/classes.all/geom/Rectangle_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/geom/Rectangle_as.hx 2009-05-28 16:25:59
+0000
@@ -1,6 +1,6 @@
// Rectangle_as.hx: ActionScript 3 "Rectangle" class, for Gnash.
//
-// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
+// Generated on: 20090528 by "bnaugle". Remove this
// after any hand editing loosing changes.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
@@ -24,13 +24,12 @@
// DejaGnu.hx header file for the testing framework support.
#if flash9
+import flash.display.MovieClip;
+#else
+import flash.MovieClip;
+#end
import flash.geom.Rectangle;
import flash.geom.Point;
-import flash.display.MovieClip;
-#else
-import flash.Rectangle;
-import flash.MovieClip;
-#end
import flash.Lib;
import Type;
@@ -40,161 +39,176 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class Rectangle_as {
static function main() {
+#if flash9
var x1:Rectangle = new Rectangle();
- var p1:Point = new Point();
-
+ var p1:Point = new Point();
+#else
+ var i:Int=7;
+ var x1:Rectangle<Int> = new Rectangle(i,i,i,i);
+ var p1:Point<Int> = new Point(i,i);
+#end
// Make sure we actually get a valid class
if (x1 != null) {
DejaGnu.pass("Rectangle class exists");
} else {
DejaGnu.fail("Rectangle 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.bottom == 0) {
- DejaGnu.pass("Rectangle.bottom property exists");
- } else {
- DejaGnu.fail("Rectangle.bottom property doesn't exist");
- }
-// if (x1.bottomRight == Point) {
-// DejaGnu.pass("Rectangle.bottomRight property exists");
-// } else {
-// DejaGnu.fail("Rectangle.bottomRight property doesn't exist");
-// }
- if (x1.height == 0) {
- DejaGnu.pass("Rectangle.height property exists");
- } else {
- DejaGnu.fail("Rectangle.height property doesn't exist");
- }
- if (x1.left == 0) {
- DejaGnu.pass("Rectangle.left property exists");
- } else {
- DejaGnu.fail("Rectangle.left property doesn't exist");
- }
- if (x1.right == 0) {
- DejaGnu.pass("Rectangle.right property exists");
- } else {
- DejaGnu.fail("Rectangle.right property doesn't exist");
- }
-// if (x1.size == Point) {
-// DejaGnu.pass("Rectangle.size property exists");
-// } else {
-// DejaGnu.fail("Rectangle.size property doesn't exist");
-// }
- if (x1.top == 0) {
- DejaGnu.pass("Rectangle.top property exists");
- } else {
- DejaGnu.fail("Rectangle.top property doesn't exist");
- }
-// if (x1.topLeft == Point) {
-// DejaGnu.pass("Rectangle.topLeft property exists");
-// } else {
-// DejaGnu.fail("Rectangle.topLeft property doesn't exist");
-// }
- if (x1.width == 0) {
- DejaGnu.pass("Rectangle.width property exists");
- } else {
- DejaGnu.fail("Rectangle.width property doesn't exist");
- }
- if (x1.x == 0) {
- DejaGnu.pass("Rectangle.x property exists");
- } else {
- DejaGnu.fail("Rectangle.x property doesn't exist");
- }
- if (x1.y == 0) {
- DejaGnu.pass("Rectangle.y property exists");
- } else {
- DejaGnu.fail("Rectangle.y property 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(x1.bottom) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.bottom property exists");
+ } else {
+ DejaGnu.fail("Rectangle.bottom property doesn't exist");
+ }
+//FIXME: TClass([class Point]) != TClass([class Point])
+// if (Type.typeof(x1.bottomRight) == Type.typeof(p1)) {
+// DejaGnu.pass("Rectangle.bottomRight property exists");
+// } else {
+// DejaGnu.fail("Rectangle.bottomRight property doesn't
exist");
+// }
+ DejaGnu.note("Type of x1.bottomRight =
"+Type.typeof(x1.bottomRight));
+ DejaGnu.note("Type of p1 = "+Type.typeof(p1));
+ DejaGnu.note("These types are not equal");
+ if (Type.typeof(x1.height) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.height property exists");
+ } else {
+ DejaGnu.fail("Rectangle.height property doesn't exist");
+ }
+ if (Type.typeof(x1.left) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.left property exists");
+ } else {
+ DejaGnu.fail("Rectangle.left property doesn't exist");
+ }
+ if (Type.typeof(x1.right) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.right property exists");
+ } else {
+ DejaGnu.fail("Rectangle.right property doesn't exist");
+ }
+//FIXME: TClass([class Point]) != TClass([class Point])
+// if (Type.typeof(x1.size) == Type.typeof(p1)) {
+// DejaGnu.pass("Rectangle.size property exists");
+// } else {
+// DejaGnu.fail("Rectangle.size property doesn't exist");
+// }
+ if (Type.typeof(x1.top) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.top property exists");
+ } else {
+ DejaGnu.fail("Rectangle.top property doesn't exist");
+ }
+//FIXME: TClass([class Point]) != TClass([class Point])
+// if (Type.typeof(x1.topLeft) == Type.typeof(p1)) {
+// DejaGnu.pass("Rectangle.topLeft property exists");
+// } else {
+// DejaGnu.fail("Rectangle.topLeft property doesn't exist");
+// }
+ if (Type.typeof(x1.width) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.width property exists");
+ } else {
+ DejaGnu.fail("Rectangle.width property doesn't exist");
+ }
+ if (Type.typeof(x1.x) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.x property exists");
+ } else {
+ DejaGnu.fail("Rectangle.x property doesn't exist");
+ }
+ if (Type.typeof(x1.y) == ValueType.TInt) {
+ DejaGnu.pass("Rectangle.y property exists");
+ } else {
+ DejaGnu.fail("Rectangle.y property doesn't exist");
+ }
-// Tests to see if all the methods exist. All these do is test for
-// existance of a method, and don't test the functionality at all. This
-// is primarily useful only to test completeness of the API implementation.
-// if (x1.Rectangle == 0) {
-// DejaGnu.pass("Rectangle::Rectangle() method exists");
-// } else {
-// DejaGnu.fail("Rectangle::Rectangle() method doesn't exist");
-// }
-// if (x1.clone == Rectangle) {
-// DejaGnu.pass("Rectangle::clone() method exists");
-// } else {
-// DejaGnu.fail("Rectangle::clone() method doesn't exist");
-// }
- if (x1.contains(1,0) == false) {
- DejaGnu.pass("Rectangle::contains() method exists");
- } else {
- DejaGnu.fail("Rectangle::contains() method 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.
+ //Test constructor existance
+ if (Type.typeof(x1.clone) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::clone() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::clone() method doesn't exist");
+ }
+ if (Type.typeof(x1.contains) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::contains() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::contains() method doesn't
exist");
+ }
- if (x1.containsPoint(p1) == false) {
- DejaGnu.pass("Rectangle::containsPoint() method exists");
- } else {
- DejaGnu.fail("Rectangle::containsPoint() method doesn't exist");
- }
- if (x1.containsRect(x1) == false) {
- DejaGnu.pass("Rectangle::containsRect() method exists");
- } else {
- DejaGnu.fail("Rectangle::containsRect() method doesn't exist");
- }
-// if (x1.equals == false) {
-// DejaGnu.pass("Rectangle::equals() method exists");
-// } else {
-// DejaGnu.fail("Rectangle::equals() method doesn't exist");
-// }
- if (x1.inflate == null) {
- DejaGnu.pass("Rectangle::inflate() method exists");
- } else {
- DejaGnu.fail("Rectangle::inflate() method doesn't exist");
- }
- if (x1.inflatePoint == null) {
- DejaGnu.pass("Rectangle::inflatePoint() method exists");
- } else {
- DejaGnu.fail("Rectangle::inflatePoint() method doesn't exist");
- }
-// if (x1.intersection == Rectangle) {
-// DejaGnu.pass("Rectangle::intersection() method exists");
-// } else {
-// DejaGnu.fail("Rectangle::intersection() method doesn't exist");
-// }
- if (x1.intersects(x1) == false) {
- DejaGnu.pass("Rectangle::intersects() method exists");
- } else {
- DejaGnu.fail("Rectangle::intersects() method doesn't exist");
- }
- if (x1.isEmpty() == false) {
- DejaGnu.pass("Rectangle::isEmpty() method exists");
- } else {
- DejaGnu.fail("Rectangle::isEmpty() method doesn't exist");
- }
- if (x1.offset == null) {
- DejaGnu.pass("Rectangle::offset() method exists");
- } else {
- DejaGnu.fail("Rectangle::offset() method doesn't exist");
- }
- if (x1.offsetPoint == null) {
- DejaGnu.pass("Rectangle::offsetPoint() method exists");
- } else {
- DejaGnu.fail("Rectangle::offsetPoint() method doesn't exist");
- }
- if (x1.setEmpty == null) {
- DejaGnu.pass("Rectangle::setEmpty() method exists");
- } else {
- DejaGnu.fail("Rectangle::setEmpty() method doesn't exist");
- }
- if (x1.toString == null) {
- DejaGnu.pass("Rectangle::toString() method exists");
- } else {
- DejaGnu.fail("Rectangle::toString() method doesn't exist");
- }
-// if (x1.union == Rectangle) {
-// DejaGnu.pass("Rectangle::union() method exists");
-// } else {
-// DejaGnu.fail("Rectangle::union() method doesn't exist");
-// }
+ if (Type.typeof(x1.containsPoint) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::containsPoint() method
exists");
+ } else {
+ DejaGnu.fail("Rectangle::containsPoint() method doesn't
exist");
+ }
+#if flash9
+ if (Type.typeof(x1.containsRect) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::containsRect() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::containsRect() method doesn't
exist");
+ }
+#else
+ if (Type.typeof(x1.containsRectangle) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::containsRect() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::containsRect() method doesn't
exist");
+ }
+#end
+ if (Type.typeof(x1.equals) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::equals() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::equals() method doesn't exist");
+ }
+ if (Type.typeof(x1.inflate) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::inflate() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::inflate() method doesn't
exist");
+ }
+ if (Type.typeof(x1.inflatePoint) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::inflatePoint() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::inflatePoint() method doesn't
exist");
+ }
+ if (Type.typeof(x1.intersection) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::intersection() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::intersection() method doesn't
exist");
+ }
+ if (Type.typeof(x1.intersects) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::intersects() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::intersects() method doesn't
exist");
+ }
+ if (Type.typeof(x1.isEmpty) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::isEmpty() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::isEmpty() method doesn't
exist");
+ }
+ if (Type.typeof(x1.offset) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::offset() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::offset() method doesn't
exist");
+ }
+ if (Type.typeof(x1.offsetPoint) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::offsetPoint() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::offsetPoint() method doesn't
exist");
+ }
+ if (Type.typeof(x1.setEmpty) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::setEmpty() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::setEmpty() method doesn't
exist");
+ }
+ if (Type.typeof(x1.toString) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::toString() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::toString() method doesn't
exist");
+ }
+ if (Type.typeof(x1.union) == ValueType.TFunction) {
+ DejaGnu.pass("Rectangle::union() method exists");
+ } else {
+ DejaGnu.fail("Rectangle::union() method doesn't exist");
+ }
- // Call this after finishing all tests. It prints out the totals.
- DejaGnu.done();
+ // Call this after finishing all tests. It prints out the totals.
+ DejaGnu.done();
}
}
=== modified file 'testsuite/as3/classes.all/net/SharedObject_as.hx'
--- a/testsuite/as3/classes.all/net/SharedObject_as.hx 2009-05-21 00:17:43
+0000
+++ b/testsuite/as3/classes.all/net/SharedObject_as.hx 2009-05-28 16:25:59
+0000
@@ -1,6 +1,6 @@
// SharedObject_as.hx: ActionScript 3 "SharedObject" class, for Gnash.
//
-// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
+// Generated on: 20090528 by "bnaugle". Remove this
// after any hand editing loosing changes.
//
// Copyright (C) 2009 Free Software Foundation, Inc.
@@ -23,6 +23,9 @@
// This test case must be processed by CPP before compiling to include the
// DejaGnu.hx header file for the testing framework support.
+#error
+//FIXME: This test produces a Segmentation Fault
+
#if flash9
import flash.net.SharedObject;
import flash.display.MovieClip;
@@ -32,6 +35,7 @@
#end
import flash.Lib;
import Type;
+import StdTypes;
// import our testing API
import DejaGnu;
@@ -40,7 +44,7 @@
class SharedObject_as {
static function main() {
var x1:SharedObject = new SharedObject();
-
+// var c:Dynamic = ;
// Make sure we actually get a valid class
if (x1 != null) {
DejaGnu.pass("SharedObject class exists");
@@ -50,89 +54,91 @@
// 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) {
+#if flash9
+//FIXME: TClass not understood by test programmer
+// if (Type.typeof(x1.client) == ValueType.TClass(c)) {
// DejaGnu.pass("SharedObject.client property exists");
// } else {
// DejaGnu.fail("SharedObject.client property doesn't exist");
// }
-// if (x1.data == Object) {
-// DejaGnu.pass("SharedObject.data property exists");
-// } else {
-// DejaGnu.fail("SharedObject.data property doesn't exist");
-// }
- if (SharedObject.defaultObjectEncoding == 0) {
- DejaGnu.pass("SharedObject.defaultObjectEncoding property exists");
- } else {
- DejaGnu.fail("SharedObject.defaultObjectEncoding property doesn't
exist");
- }
-// FIXME: Field fps cannot be accessed for reading
-// if (x1.fps == 0) {
+//FIXME: Field fps cannot be accessed for reading
+// if (Type.typeof(x1.fps) == ValueType.TFloat) {
// DejaGnu.pass("SharedObject.fps property exists");
// } else {
// DejaGnu.fail("SharedObject.fps property doesn't exist");
// }
- if (x1.objectEncoding == 0) {
+ if (Type.typeof(x1.objectEncoding) == ValueType.TInt) {
DejaGnu.pass("SharedObject.objectEncoding property exists");
} else {
DejaGnu.fail("SharedObject.objectEncoding property doesn't exist");
}
- if (x1.size == 0) {
+ if (Type.typeof(x1.size) == ValueType.TInt) {
DejaGnu.pass("SharedObject.size property exists");
} else {
DejaGnu.fail("SharedObject.size property doesn't exist");
}
-
+ if (Type.typeof(SharedObject.defaultObjectEncoding) == ValueType.TInt) {
+ DejaGnu.pass("SharedObject.defaultObjectEncoding property exists");
+ } else {
+ DejaGnu.fail("SharedObject.defaultObjectEncoding property doesn't
exist");
+ }
+#end
+//FIXME
+// if (Type.typeof(x1.data) == ValueType.TClass(c)) {
+// DejaGnu.pass("SharedObject.data property exists");
+// } else {
+// DejaGnu.fail("SharedObject.data 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.clear == null) {
+ if (Type.typeof(x1.clear) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::clear() method exists");
} else {
DejaGnu.fail("SharedObject::clear() method doesn't exist");
}
- if (x1.close == null) {
+ if (Type.typeof(x1.close) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::close() method exists");
} else {
DejaGnu.fail("SharedObject::close() method doesn't exist");
}
- if (x1.connect == null) {
+ if (Type.typeof(x1.connect) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::connect() method exists");
} else {
DejaGnu.fail("SharedObject::connect() method doesn't exist");
}
- if (x1.flush == null) {
+ if (Type.typeof(x1.flush) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::flush() method exists");
} else {
DejaGnu.fail("SharedObject::flush() method doesn't exist");
}
-// if (x1.getLocal == SharedObject) {
-// DejaGnu.pass("SharedObject::getLocal() method exists");
-// } else {
-// DejaGnu.fail("SharedObject::getLocal() method doesn't exist");
-// }
-// if (x1.getRemote == SharedObject) {
-// DejaGnu.pass("SharedObject::getRemote() method exists");
-// } else {
-// DejaGnu.fail("SharedObject::getRemote() method doesn't exist");
-// }
- if (x1.send == null) {
+ if (Type.typeof(x1.send) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::send() method exists");
} else {
DejaGnu.fail("SharedObject::send() method doesn't exist");
}
- if (x1.setDirty == null) {
+ if (Type.typeof(x1.setDirty) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::setDirty() method exists");
} else {
DejaGnu.fail("SharedObject::setDirty() method doesn't exist");
}
- if (x1.setProperty == null) {
+ if (Type.typeof(x1.setProperty) == ValueType.TFunction) {
DejaGnu.pass("SharedObject::setProperty() method exists");
} else {
DejaGnu.fail("SharedObject::setProperty() method doesn't exist");
}
-
- // Call this after finishing all tests. It prints out the totals.
- DejaGnu.done();
+ if (Type.typeof(SharedObject.getLocal) == ValueType.TFunction) {
+ DejaGnu.pass("SharedObject::getLocal() method exists");
+ } else {
+ DejaGnu.fail("SharedObject::getLocal() method doesn't exist");
+ }
+ if (Type.typeof(SharedObject.getRemote) == ValueType.TFunction) {
+ DejaGnu.pass("SharedObject::getRemote() method exists");
+ } else {
+ DejaGnu.fail("SharedObject::getRemote() method doesn't exist");
+ }
+ // 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 r10944: Modified Test Cases (Point, Rectangle, SharedObject),
Bob Naugle <=