git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
darwin fixes
[swftools.git]
/
lib
/
as3
/
ok
/
ops.as
diff --git
a/lib/as3/ok/ops.as
b/lib/as3/ok/ops.as
index
642ea12
..
9f14136
100644
(file)
--- a/
lib/as3/ok/ops.as
+++ b/
lib/as3/ok/ops.as
@@
-3,7
+3,7
@@
package {
import flash.display.MovieClip
public class Main extends flash.display.MovieClip {
var count:int = 1;
import flash.display.MovieClip
public class Main extends flash.display.MovieClip {
var count:int = 1;
- var num:int = 27;
+ var num:int = 30;
function assert(b:Boolean) {
if(b) {
trace("ok "+count+"/"+num);
function assert(b:Boolean) {
if(b) {
trace("ok "+count+"/"+num);
@@
-39,6
+39,13
@@
package {
assert(2+3==5);
assert(2-3==-1);
assert(2+3==5);
assert(2-3==-1);
+ /* test or */
+ var y = 0;
+ var x = y || 1;
+ assert(x);
+ var z = x && 1;
+ assert(z);
+
/* test not */
trace("[not]");
assert(!false);
/* test not */
trace("[not]");
assert(!false);
@@
-57,6
+64,8
@@
package {
assert((0xff ^ 0x55) == 0xaa);
assert((1 & ~1) == 0);
assert((1|~1)==~0);
assert((0xff ^ 0x55) == 0xaa);
assert((1 & ~1) == 0);
assert((1|~1)==~0);
+
+ assert((1|2|4|8|16|32|64|128) == 0xff);
/* test shift operations */
trace("[shift operations]");
/* test shift operations */
trace("[shift operations]");
@@
-76,6
+85,8
@@
package {
/* test comma */
trace("[comma]");
assert( (1,2,3,4) == 4);
/* test comma */
trace("[comma]");
assert( (1,2,3,4) == 4);
+
+ trace("[exit]");
}
}
}
}
}
}