git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
407b8ca
)
check precedence of as,in against ==
author
kramm
<kramm>
Tue, 30 Dec 2008 22:47:22 +0000
(22:47 +0000)
committer
kramm
<kramm>
Tue, 30 Dec 2008 22:47:22 +0000
(22:47 +0000)
lib/as3/ok/precedence.as
patch
|
blob
|
history
diff --git
a/lib/as3/ok/precedence.as
b/lib/as3/ok/precedence.as
index
3f145f5
..
80981f4
100644
(file)
--- a/
lib/as3/ok/precedence.as
+++ b/
lib/as3/ok/precedence.as
@@
-7,7
+7,7
@@
package {
}
public class Main extends flash.display.MovieClip {
var count:int = 1;
}
public class Main extends flash.display.MovieClip {
var count:int = 1;
- var num:int = 27;
+ var num:int = 53;
function assert(b) {
if(b) {
trace("ok "+count+"/"+num);
function assert(b) {
if(b) {
trace("ok "+count+"/"+num);
@@
-82,6
+82,12
@@
package {
// test that <,>,<=,>= have higher precedence than as, in
compare(1<2 as Boolean, true)
//compare(1<2 in [true,true,true], true)
// test that <,>,<=,>= have higher precedence than as, in
compare(1<2 as Boolean, true)
//compare(1<2 in [true,true,true], true)
+
+ // test that as,in have higher precedence than ==,!=
+ compare(1==1 as Boolean, false);
+ compare(1!=1 as Boolean, true);
+ compare(false == true is Boolean, false);
+ compare(true != true is Boolean, false);
// test that >,<,>=,<= have higher precedence than ==, !=, ===, !==
compare(true == 3<4, true)
// test that >,<,>=,<= have higher precedence than ==, !=, ===, !==
compare(true == 3<4, true)