git.asbjorn.biz
/
swftools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
don't drop empty glyphs in poly2bitmap
[swftools.git]
/
lib
/
as3
/
ok
/
novalue.as
1
package {
2
import flash.display.MovieClip
3
4
public class Main extends flash.display.MovieClip {
5
6
var count:int = 1;
7
var num:int = 6;
8
function assert(b) {
9
if(b) {
10
trace("ok "+count+"/"+num);
11
} else {
12
trace("error "+count+"/"+num);
13
}
14
count = count + 1
15
}
16
function compare(x,y) {
17
assert(x==y);
18
}
19
20
function Main() {
21
var x:int=0;
22
var y:int=0;
23
24
/* test for &&/|| as "inline if" */
25
26
x++;
27
assert(x==1);
28
29
x++ || y++;
30
assert(x==2);
31
assert(y==0);
32
33
x++ && y++;
34
assert(x==3);
35
assert(y==1);
36
37
false && y++;
38
assert(y==1);
39
40
trace("[exit]");
41
}
42
43
}
44
}
45