From bac7bd61361384cc0a9e255e508e6f9415ae87ff Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 30 Dec 2008 22:51:23 +0000 Subject: [PATCH] test for typeof() --- lib/as3/ok/typeof.as | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/as3/ok/typeof.as diff --git a/lib/as3/ok/typeof.as b/lib/as3/ok/typeof.as new file mode 100644 index 0000000..029fde0 --- /dev/null +++ b/lib/as3/ok/typeof.as @@ -0,0 +1,16 @@ +package { + import flash.display.MovieClip; + public class Main extends flash.display.MovieClip { + function f() {} + function Main() { + if(typeof(3)=="number") trace("ok 1/7"); + if(typeof("")=="string") trace("ok 2/7"); + if(typeof(this)=="object") trace("ok 3/7"); + if(typeof(undefined)=="undefined") trace("ok 4/7"); + if(typeof(null)=="object") trace("ok 5/7"); + if(typeof(f)=="function") trace("ok 6/7"); + if(typeof(Main)=="object" || + typeof(Main)=="movieclip") trace("ok 7/7"); + } + } +} -- 1.7.10.4