Home | History | Annotate | Download | only in kde

Lines Matching full:shouldbe

28 shouldBe("Array().length", "0");
29 shouldBe("(new Array()).length", "0");
30 shouldBe("(new Array(3)).length", "3");
31 shouldBe("(new Array(11, 22)).length", "2");
32 shouldBe("(new Array(11, 22))[0]", "11");
33 shouldBe("Array(11, 22)[1]", "22");
35 shouldBe("String(new Array(11, 22))", "'11,22'");
36 shouldBe("var a = []; a[0] = 33; a[0]", "33");
37 shouldBe("var a = []; a[0] = 33; a.length", "1");
38 shouldBe("var a = [11, 22]; a.length = 1; String(a);", "'11'");
39 shouldBe("var a = [11, 22]; a.length = 1; a.length;", "1");
53 shouldBe("ename", "'RangeError'");
65 shouldBe("ename", "'RangeError'");
68 shouldBe("Array().toString()", "''");
69 shouldBe("Array(3).toString()", "',,'");
70 shouldBe("Array(11, 22).toString()", "'11,22'");
71 shouldBe("String(Array(11, 22).concat(33))", "'11,22,33'");
72 shouldBe("String(Array(2).concat(33, 44))", "',,33,44'");
73 shouldBe("String(Array(2).concat(Array(2)))", "',,,'");
74 shouldBe("String(Array(11,22).concat(Array(33,44)))", "'11,22,33,44'");
75 shouldBe("String(Array(1,2).concat(3,Array(4,5)))", "'1,2,3,4,5'");
76 shouldBe("var a = new Array(1,2,3); delete a[1]; String(a.concat(4))", "'1,,3,4'");
78 shouldBe("[1,2,3,4].slice(1, 3).toString()", "'2,3'");
79 shouldBe("[1,2,3,4].slice(-3, -1).toString()", "'2,3'");
80 shouldBe("[1,2].slice(-9, 0).length", "0");
81 shouldBe("[1,2].slice(1).toString()", "'2'");
82 shouldBe("[1,2].slice().toString()", "'1,2'");
85 shouldBe("(new Array('a')).length", "1");
86 shouldBe("(new Array('a'))[0]", "'a'");
89 shouldBe("Array('a').length", "1");
90 shouldBe("Array('a')[0]", "'a'");
92 shouldBe("String(Array())", "''");
93 shouldBe("String(Array('a','b'))", "'a,b'");
95 shouldBe("[].length", "0");
96 shouldBe("['a'].length", "1");
97 shouldBe("['a'][0]", "'a'");
98 shouldBe("['a',,'c'][2]", "'c'");
99 shouldBe("['a',undefined,'c'][1]", "undefined");
100 shouldBe("['a',,'c'][1]", "undefined");
101 shouldBe("1 in ['a',,'c']", "false");
102 shouldBe("1 in ['a',undefined,'c']", "true");
106 shouldBe("1 in arrayWithDeletion", "false");
115 shouldBe("forInSum([])", "''");
116 shouldBe("forInSum(Array())", "''");
117 shouldBe("forInSum(Array('a'))", "'a'");
118 shouldBe("forInSum([,undefined,'x','aa'])", "'undefinedxaa'");
121 shouldBe("forInSum(a0)", "''");
124 shouldBe("forInSum(a1)", "'a'");
126 shouldBe("String([].sort())", "''")
127 shouldBe("String([3,1,'2'].sort())", "'1,2,3'");
128 shouldBe("String([,'x','aa'].sort())", "'aa,x,'");
129 shouldBe("String([,undefined,'x','aa'].sort())", "'aa,x,,'");
130 shouldBe("2 in [,undefined,'x','aa'].sort()", "true");
131 shouldBe("3 in [,undefined,'x','aa'].sort()", "false");
144 shouldBe("var a = ['aa', 'b', 'cccc', 'ddd']; String(a.sort(comp))", "'b,aa,ddd,cccc'");
147 shouldBe("[0, Infinity].sort(function(a, b) { return a - b }).toString()", "'0,Infinity'");
150 shouldBe("[].unshift('a')", "1");
151 shouldBe("['c'].unshift('a', 'b')", "3");
152 shouldBe("var a = []; a.unshift('a'); String(a)", "'a'");
153 shouldBe("var a = ['c']; a.unshift('a', 'b'); String(a)", "'a,b,c'");
156 shouldBe("String(['a', 'b', 'c'].splice(1, 2, 'x', 'y'))", "'b,c'");
167 shouldBe("arr.length","40");
168 shouldBe("arr[maxint]","\"test\"");
170 shouldBe("arr.length","40");
171 shouldBe("arr[maxint]","undefined");
173 shouldBe("arr.length","maxint");
174 shouldBe("arr[maxint-1]","\"test2\"");
180 shouldBe("arr.length","40");
181 shouldBe("arr[55.5]","\"test\"");
182 shouldBe("arr[65.11111111111111111111111111111]","\"test\"");
185 shouldBe("arr.length","40");
186 shouldBe("arr[55.5]","undefined");
187 shouldBe("arr[65.11111111111111111111111111111]","undefined");
195 shouldBe("propnames.length","3");
196 shouldBe("propnames[0]","'0'");
197 shouldBe("propnames[1]","'1'");
198 shouldBe("propnames[2]","'2'");
214 shouldBe("[1].toString()", "'1'");
215 shouldBe("[1].toLocaleString()", "'toLocaleString'");
217 shouldBe("[1].toLocaleString()", "'1'");
218 shouldBe("[/r/].toString()", "'toString2'");
219 shouldBe("[/r/].toLocaleString()", "'toLocaleString2'");
221 shouldBe("[/r/].toLocaleString()", "'toString2'");