[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10976: Last text test case
From: |
Bob Naugle |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10976: Last text test case |
Date: |
Tue, 02 Jun 2009 16:49:24 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10976
committer: Bob Naugle <address@hidden>
branch nick: trunk
timestamp: Tue 2009-06-02 16:49:24 -0600
message:
Last text test case
modified:
testsuite/as3/classes.all/text/TextLineMetrics_as.hx
=== modified file 'testsuite/as3/classes.all/text/TextLineMetrics_as.hx'
--- a/testsuite/as3/classes.all/text/TextLineMetrics_as.hx 2009-05-21
00:17:43 +0000
+++ b/testsuite/as3/classes.all/text/TextLineMetrics_as.hx 2009-06-02
22:49:24 +0000
@@ -1,6 +1,6 @@
// TextLineMetrics_as.hx: ActionScript 3 "TextLineMetrics" 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,13 +25,12 @@
#if flash9
import flash.text.TextLineMetrics;
+import flash.text.TextField;
import flash.display.MovieClip;
-#else
-import flash.TextLineMetrics;
-import flash.MovieClip;
#end
import flash.Lib;
import Type;
+import Std;
// import our testing API
import DejaGnu;
@@ -39,10 +38,12 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class TextLineMetrics_as {
static function main() {
- var x1:TextLineMetrics = new TextLineMetrics();
+#if flash9
+ var t1:TextField = new TextField();
+ var x1:TextLineMetrics = t1.getLineMetrics(0);
// Make sure we actually get a valid class
- if (x1 != null) {
+ if (Std.is(x1, TextLineMetrics)) {
DejaGnu.pass("TextLineMetrics class exists");
} else {
DejaGnu.fail("TextLineMetrics class doesn't exist");
@@ -50,48 +51,42 @@
// 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.ascent == 0) {
+ if (Std.is(x1.ascent, Float)) {
DejaGnu.pass("TextLineMetrics.ascent property exists");
} else {
DejaGnu.fail("TextLineMetrics.ascent property doesn't exist");
}
- if (x1.descent == 0) {
+ if (Std.is(x1.descent, Float)) {
DejaGnu.pass("TextLineMetrics.descent property exists");
} else {
DejaGnu.fail("TextLineMetrics.descent property doesn't exist");
}
- if (x1.height == 0) {
+ if (Std.is(x1.height, Float)) {
DejaGnu.pass("TextLineMetrics.height property exists");
} else {
DejaGnu.fail("TextLineMetrics.height property doesn't exist");
}
- if (x1.leading == 0) {
+ if (Std.is(x1.leading, Float)) {
DejaGnu.pass("TextLineMetrics.leading property exists");
} else {
DejaGnu.fail("TextLineMetrics.leading property doesn't exist");
}
- if (x1.width == 0) {
+ if (Std.is(x1.width, Float)) {
DejaGnu.pass("TextLineMetrics.width property exists");
} else {
DejaGnu.fail("TextLineMetrics.width property doesn't exist");
}
- if (x1.x == 0) {
+ if (Std.is(x1.x, Float)) {
DejaGnu.pass("TextLineMetrics.x property exists");
} else {
DejaGnu.fail("TextLineMetrics.x 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.TextLineMetrics == 0) {
- DejaGnu.pass("TextLineMetrics::TextLineMetrics() method exists");
- } else {
- DejaGnu.fail("TextLineMetrics::TextLineMetrics() method doesn't
exist");
- }
-
- // Call this after finishing all tests. It prints out the totals.
+ // Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
+#else
+ DejaGnu.note("This class (TextLineMetrics) is only available in
flash9");
+#end
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10976: Last text test case,
Bob Naugle <=