X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fok%2Fprecedence.as;h=2424fc416387d2d8363bfef7cea5e083fe1ad6f6;hb=4da50aa69285c6f5abd97e41dd195648b8df49fe;hp=3f145f5426702bdb8d6abeb594281a019eec92f6;hpb=a43e097bc7958c5739ef3e77cdcedd56ddc060b9;p=swftools.git diff --git a/lib/as3/ok/precedence.as b/lib/as3/ok/precedence.as index 3f145f5..2424fc4 100644 --- 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; - var num:int = 27; + var num:int = 53; 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 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) @@ -137,6 +143,7 @@ package { v += 3,4; compare(v,3) + trace("[exit]"); } }