Home | History | Annotate | Download | only in Expressions

Lines Matching refs:testcases

46     var testcases = new Array();
49 testcases[testcases.length] = new TestCase( SECTION, "typeof(void(0))", "undefined", typeof(void(0)) );
50 testcases[testcases.length] = new TestCase( SECTION, "typeof(null)", "object", typeof(null) );
51 testcases[testcases.length] = new TestCase( SECTION, "typeof(true)", "boolean", typeof(true) );
52 testcases[testcases.length] = new TestCase( SECTION, "typeof(false)", "boolean", typeof(false) );
53 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Boolean())", "object", typeof(new Boolean()) );
54 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Boolean(true))", "object", typeof(new Boolean(true)) );
55 testcases[testcases.length] = new TestCase( SECTION, "typeof(Boolean())", "boolean", typeof(Boolean()) );
56 testcases[testcases.length] = new TestCase( SECTION, "typeof(Boolean(false))", "boolean", typeof(Boolean(false)) );
57 testcases[testcases.length] = new TestCase( SECTION, "typeof(Boolean(true))", "boolean", typeof(Boolean(true)) );
58 testcases[testcases.length] = new TestCase( SECTION, "typeof(NaN)", "number", typeof(Number.NaN) );
59 testcases[testcases.length] = new TestCase( SECTION, "typeof(Infinity)", "number", typeof(Number.POSITIVE_INFINITY) );
60 testcases[testcases.length] = new TestCase( SECTION, "typeof(-Infinity)", "number", typeof(Number.NEGATIVE_INFINITY) );
61 testcases[testcases.length] = new TestCase( SECTION, "typeof(Math.PI)", "number", typeof(Math.PI) );
62 testcases[testcases.length] = new TestCase( SECTION, "typeof(0)", "number", typeof(0) );
63 testcases[testcases.length] = new TestCase( SECTION, "typeof(1)", "number", typeof(1) );
64 testcases[testcases.length] = new TestCase( SECTION, "typeof(-1)", "number", typeof(-1) );
65 testcases[testcases.length] = new TestCase( SECTION, "typeof('0')", "string", typeof("0") );
66 testcases[testcases.length] = new TestCase( SECTION, "typeof(Number())", "number", typeof(Number()) );
67 testcases[testcases.length] = new TestCase( SECTION, "typeof(Number(0))", "number", typeof(Number(0)) );
68 testcases[testcases.length] = new TestCase( SECTION, "typeof(Number(1))", "number", typeof(Number(1)) );
69 testcases[testcases.length] = new TestCase( SECTION, "typeof(Nubmer(-1))", "number", typeof(Number(-1)) );
70 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Number())", "object", typeof(new Number()) );
71 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Number(0))", "object", typeof(new Number(0)) );
72 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Number(1))", "object", typeof(new Number(1)) );
76 testcases[testcases.length] = new TestCase( SECTION, "typeof(Math)", "object", typeof(Math) );
78 testcases[testcases.length] = new TestCase( SECTION, "typeof(Number.prototype.toString)", "function", typeof(Number.prototype.toString) );
80 testcases[testcases.length] = new TestCase( SECTION, "typeof('a string')", "string", typeof("a string") );
81 testcases[testcases.length] = new TestCase( SECTION, "typeof('')", "string", typeof("") );
82 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Date())", "object", typeof(new Date()) );
83 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Array(1,2,3))", "object", typeof(new Array(1,2,3)) );
84 testcases[testcases.length] = new TestCase( SECTION, "typeof(new String('string object'))", "object", typeof(new String("string object")) );
85 testcases[testcases.length] = new TestCase( SECTION, "typeof(String('string primitive'))", "string", typeof(String("string primitive")) );
86 testcases[testcases.length] = new TestCase( SECTION, "typeof(['array', 'of', 'strings'])", "object", typeof(["array", "of", "strings"]) );
87 testcases[testcases.length] = new TestCase( SECTION, "typeof(new Function())", "function", typeof( new Function() ) );
88 testcases[testcases.length] = new TestCase( SECTION, "typeof(parseInt)", "function", typeof( parseInt ) );
89 testcases[testcases.length] = new TestCase( SECTION, "typeof(test)", "function", typeof( test ) );
90 testcases[testcases.length] = new TestCase( SECTION, "typeof(String.fromCharCode)", "function", typeof( String.fromCharCode ) );
98 for ( tc=0; tc < testcases.length; tc++ ) {
99 testcases[tc].passed = writeTestCaseResult(
100 testcases[tc].expect,
101 testcases[tc].actual,
102 testcases[tc].description +" = "+
103 testcases[tc].actual );
105 testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
108 return ( testcases );