From: kramm Date: Tue, 6 Jan 2009 21:28:30 +0000 (+0000) Subject: added test for ?: statement X-Git-Tag: release-0-9-0~410 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=2952c28443051be702589696c6033937dc95de51;hp=a02b6b3166cc27457b99dee241fb3658e30d5ea1;p=swftools.git added test for ?: statement --- diff --git a/lib/as3/ok/reconcile.as b/lib/as3/ok/reconcile.as index fd06ffc..71abbdc 100644 --- a/lib/as3/ok/reconcile.as +++ b/lib/as3/ok/reconcile.as @@ -13,7 +13,7 @@ if(dataBuffer) break; } - trace("ok 1/5"); + trace("ok 1/6"); } public function test2() { @@ -21,7 +21,7 @@ while(output.length<1) { output += "abc".charAt(0); } - trace("ok 2/5"); + trace("ok 2/6"); } public function test3() { @@ -32,27 +32,34 @@ } break; } - trace("ok 3/5"); + trace("ok 3/6"); } + public var b:Boolean = false; + public function test4() { var x:int; var y:uint; - if(escape("")) { + if(b) { x = x+y; y = y+x; } - trace("ok 4/5"); + trace("ok 4/6"); } public function test5() { var x:int; var y:uint; var z:int; - if(escape("")) { + if(b) { x = x*y; z = x*z; } - trace("ok 5/5"); + trace("ok 5/6"); + } + public function test6() { + var i:int = b?3.0:3; + var j:uint = b?3:"abc"; + trace("ok 6/6"); } public function Main() { @@ -61,6 +68,7 @@ test3(); test4(); test5(); + test6(); } } }