From: Roman Bataev Date: Thu, 4 Apr 2013 02:34:19 +0000 (-0400) Subject: Add tests for typeof evaluation X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b956e5f1d9606f6fa6217826c4665316267e8a8f;p=UglifyJS.git Add tests for typeof evaluation --- diff --git a/test/compress/typeof.js b/test/compress/typeof.js new file mode 100644 index 00000000..cefdd43c --- /dev/null +++ b/test/compress/typeof.js @@ -0,0 +1,25 @@ +typeof_evaluation: { + options = { + evaluate: true + }; + input: { + a = typeof 1; + b = typeof 'test'; + c = typeof []; + d = typeof {}; + e = typeof /./; + f = typeof false; + g = typeof function(){}; + h = typeof undefined; + } + expect: { + a='number'; + b='string'; + c=typeof[]; + d=typeof{}; + e=typeof/./; + f='boolean'; + g='function'; + h='undefined'; + } +}