added more tests
[swftools.git] / lib / as3 / ok / compareseq.as
diff --git a/lib/as3/ok/compareseq.as b/lib/as3/ok/compareseq.as
new file mode 100644 (file)
index 0000000..ea61782
--- /dev/null
@@ -0,0 +1,42 @@
+package {
+    import flash.display.MovieClip
+
+    public class Main extends flash.display.MovieClip {
+
+        var count:int = 1;
+        var num:int = 16;
+
+        function istrue(b:Boolean) {
+            if(b) {
+                trace("ok "+count+"/"+num);
+            } else {
+                trace("error "+count+"/"+num);
+            }
+            count = count + 1
+        }
+        function isfalse(b:Boolean) {
+            istrue(!b);
+        }
+
+        function Main() {
+            trace("ok");
+            
+             istrue(1 < 2 < 3);
+            isfalse(2 < 1 < 3);
+            isfalse(3 < 2 < 1);
+            isfalse(1 < 3 < 2);
+            isfalse(2 < 3 < 1);
+            isfalse(3 < 1 < 2);
+             
+            isfalse(1 > 2 > 3);
+            isfalse(2 > 1 > 3);
+             istrue(3 > 2 > 1);
+            isfalse(1 > 3 > 2);
+            isfalse(2 > 3 > 1);
+            isfalse(3 > 1 > 2);
+
+            trace("[exit]");
+        }
+    }
+}
+