fixed space char detection bug
[swftools.git] / lib / as3 / ok / defaultvalue.as
1 package {
2     import flash.display.MovieClip
3     public class Main extends flash.display.MovieClip {
4
5         var o; //undefined
6         var s:String; //null
7         var b:Boolean; //false
8         var i:int; //0
9         var u:uint; //0
10         var f:Number; //NaN
11         var m:Main; //null
12
13         public function Main() {
14             var o; //undefined
15             var s:String; //null
16             var b:Boolean; //false
17             var i:int; //0
18             var u:uint; //0
19             var f:Number; //NaN
20             var m:Main; //null
21
22             if(String(o)=="undefined") trace("ok 1/14");
23             if(s===null) trace("ok 2/14");
24             if(b===false) trace("ok 3/14");
25             if(i==0) trace("ok 4/14");
26             if(u==0) trace("ok 5/14");
27             if(String(f)=="NaN") trace("ok 6/14");
28             if(m===null) trace("ok 7/14");
29             
30             if(String(this.o)=="undefined") trace("ok 8/14");
31             if(this.s===null) trace("ok 9/14");
32             if(this.b===false) trace("ok 10/14");
33             if(this.i==0) trace("ok 11/14");
34             if(this.u==0) trace("ok 12/14");
35             if(String(this.f)=="NaN") trace("ok 13/14");
36             if(this.m===null) trace("ok 14/14");
37             
38             trace("[exit]");
39         }
40     }
41 }