Skip to content

Commit 09e3119

Browse files
committed
tests: Add avm2/textformat_display test
1 parent e5964ed commit 09e3119

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package {
2+
import flash.display.*;
3+
import flash.text.*;
4+
5+
public class Test extends Sprite {
6+
public function Test() {
7+
var tf = new TextFormat();
8+
trace(tf.display);
9+
tf.display = "none";
10+
trace(tf.display);
11+
tf.display = "inline";
12+
trace(tf.display);
13+
tf.display = "block";
14+
trace(tf.display);
15+
tf.display = "unknown";
16+
trace(tf.display);
17+
tf.display = "inline";
18+
trace(tf.display);
19+
20+
try {
21+
tf.display = null;
22+
} catch (e) {
23+
trace(e.getStackTrace());
24+
}
25+
trace(tf.display);
26+
27+
try {
28+
tf.display = undefined;
29+
} catch (e) {
30+
trace(e.getStackTrace());
31+
}
32+
trace(tf.display);
33+
}
34+
}
35+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
block
2+
none
3+
inline
4+
block
5+
null
6+
inline
7+
TypeError: Error #2007: Parameter display must be non-null.
8+
at flash.text::TextFormat/set display()
9+
at Test()
10+
inline
11+
TypeError: Error #2007: Parameter display must be non-null.
12+
at flash.text::TextFormat/set display()
13+
at Test()
14+
inline
835 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
num_ticks = 1

0 commit comments

Comments
 (0)