Home
last modified time | relevance | path

Searched refs:shouldBe (Results 1 – 25 of 438) sorted by relevance

12345678910>>...18

/external/v8/test/webkit/
Dconstant-folding.js28 shouldBe('"abc" + "2.1"', '"abc2.1"');
29 shouldBe('"123" + "2.1"', '"1232.1"');
30 shouldBe('"123" + "="', '"123="');
31 shouldBe('"*" + "123"', '"*123"');
33 shouldBe('!"abc"', 'false');
34 shouldBe('!""', 'true');
36 shouldBe('10.3 + 2.1', '12.4');
37 shouldBe('10.3 + "2.1"', '"10.32.1"');
38 shouldBe('"10.3" + 2.1 ', '"10.32.1"');
39 shouldBe('"10.3" + "2.1"', '"10.32.1"');
[all …]
Dmath.js30 shouldBe("Math.abs(NaN)", "NaN");
31 shouldBe("Math.abs(0)", "0");
32 shouldBe("Math.abs(-0)", "0");
33 shouldBe("Math.abs(1)", "1");
34 shouldBe("Math.abs(-1)", "1");
35 shouldBe("Math.abs(Number.MIN_VALUE)", "Number.MIN_VALUE");
36 shouldBe("Math.abs(-Number.MIN_VALUE)", "Number.MIN_VALUE");
37 shouldBe("Math.abs(Number.MAX_VALUE)", "Number.MAX_VALUE");
38 shouldBe("Math.abs(-Number.MAX_VALUE)", "Number.MAX_VALUE");
39 shouldBe("Math.abs(Infinity)", "Infinity");
[all …]
Dregexp-zero-length-alternatives.js39 shouldBe('emptyStr.match(re1)', '[""]');
40 shouldBe('s1.match(re1)', '[""]');
41 shouldBe('s2.match(re1)', '["aaaa"]');
42 shouldBe('s3.match(re1)', '["aa"]');
46 shouldBe('emptyStr.match(re2)', '[""]');
47 shouldBe('s1.match(re2)', '[""]');
48 shouldBe('s2.match(re2)', '["aaaa"]');
49 shouldBe('s3.match(re2)', '["aa"]');
53 shouldBe('emptyStr.match(re3)', '[""]');
54 shouldBe('s1.match(re3)', '[""]');
[all …]
DToNumber.js57 shouldBe("+undefined", "NaN");
58 shouldBe("+null", "0");
59 shouldBe("+false", "0");
60 shouldBe("+true", "1");
61 shouldBe("+2", "2");
62 shouldBe("+''", "0");
63 shouldBe("+' '", "0");
64 shouldBe("+' 1'", "1");
65 shouldBe("+'1 '", "1");
66 shouldBe("+'x1'", "NaN");
[all …]
Dconvert-nan-to-bool.js26 shouldBe("NaN ? true : false", "false");
27 shouldBe("1 ? true : false", "true");
28 shouldBe("0 ? true : false", "false");
29 shouldBe("-1 ? true : false", "true");
30 shouldBe("1 * -1 ? true : false", "true");
31 shouldBe("1 * 0 ? true : false", "false");
32 shouldBe("1 * 1 ? true : false", "true");
33 shouldBe("1 / -1 ? true : false", "true");
34 shouldBe("1 / 0 ? true : false", "true");
35 shouldBe("1 / 1 ? true : false", "true");
[all …]
Dkeywords-and-reserved_words.js67 shouldBe('classifyIdentifier("x")', '"identifier"');
68 shouldBe('classifyIdentifier("id")', '"identifier"');
69 shouldBe('classifyIdentifier("identifier")', '"identifier"');
70 shouldBe('classifyIdentifier("keyword")', '"identifier"');
71 shouldBe('classifyIdentifier("strict")', '"identifier"');
72 shouldBe('classifyIdentifier("use")', '"identifier"');
74 shouldBe('classifyIdentifier("abstract")', '"identifier"');
75 shouldBe('classifyIdentifier("boolean")', '"identifier"');
76 shouldBe('classifyIdentifier("byte")', '"identifier"');
77 shouldBe('classifyIdentifier("char")', '"identifier"');
[all …]
Darray-holes.js76 shouldBe("var a = []; a.length = 1; showHoles(a)", "'[hole]'");
77 shouldBe("var a = []; a[0] = undefined; showHoles(a)", "'[undefined]'");
78 shouldBe("var a = []; a[0] = undefined; delete a[0]; showHoles(a)", "'[hole]'");
80 shouldBe("showHoles([0, , 2])", "'[0, hole, 2]'");
81 shouldBe("showHoles([0, 1, ,])", "'[0, 1, hole]'");
82 shouldBe("showHoles([0, , 2].concat([3, , 5]))", "'[0, hole, 2, 3, hole, 5]'");
83 shouldBe("showHoles([0, , 2, 3].reverse())", "'[3, 2, hole, 0]'");
84 shouldBe("a = [0, , 2, 3]; a.shift(); showHoles(a)", "'[hole, 2, 3]'");
85 shouldBe("showHoles([0, , 2, 3].slice(0, 3))", "'[0, hole, 2]'");
86 shouldBe("showHoles([0, , 2, 3].sort())", "'[0, 2, 3, hole]'");
[all …]
DparseFloat.js55 shouldBe("parseFloat()", "NaN");
56 shouldBe("parseFloat('')", "NaN");
57 shouldBe("parseFloat(' ')", "NaN");
58 shouldBe("parseFloat(' 0')", "0");
59 shouldBe("parseFloat('0 ')", "0");
60 shouldBe("parseFloat('x0')", "NaN");
61 shouldBe("parseFloat('0x')", "0");
62 shouldBe("parseFloat(' 1')", "1");
63 shouldBe("parseFloat('1 ')", "1");
64 shouldBe("parseFloat('x1')", "NaN");
[all …]
DparseInt.js27 shouldBe("parseInt('123')", '123');
28 shouldBe("parseInt('123x4')", '123');
29 shouldBe("parseInt('-123')", '-123');
30 shouldBe("parseInt('0x123')", '0x123');
31 shouldBe("parseInt('0x123x4')", '0x123');
32 shouldBe("parseInt('-0x123x4')", '-0x123');
33 shouldBe("parseInt('-')", 'Number.NaN');
34 shouldBe("parseInt('0x')", 'Number.NaN');
35 shouldBe("parseInt('-0x')", 'Number.NaN');
38 shouldBe("parseInt('123', undefined)", '123');
[all …]
Dstring-substr.js28 shouldBe("'bar'.substr(0)", "'bar'");
29 shouldBe("'bar'.substr(3)", "''");
30 shouldBe("'bar'.substr(4)", "''");
31 shouldBe("'bar'.substr(-1)", "'r'");
32 shouldBe("'bar'.substr(-3)", "'bar'");
33 shouldBe("'bar'.substr(-4)", "'bar'");
35 shouldBe("'bar'.substr(0, 0)", "''");
36 shouldBe("'bar'.substr(0, 1)", "'b'");
37 shouldBe("'bar'.substr(0, 3)", "'bar'");
38 shouldBe("'bar'.substr(0, 4)", "'bar'");
[all …]
/external/v8/test/webkit/fast/js/kde/
DNumber.js25 shouldBe("Number()", "0");
26 shouldBe("Number(1)", "1");
27 shouldBe("Number(1.1)", "1.1");
28 shouldBe("Number('1.2')", "1.2");
29 shouldBe("isNaN(Number('a'))", "true");
31 shouldBe("(new Number()).valueOf()", "0");
32 shouldBe("(new Number(.4)).valueOf()", "0.4");
33 shouldBe("(new Number('1.')).valueOf()", "1");
34 shouldBe("isNaN(new Number('a'))", "true");
36 shouldBe("isNaN(Number.NaN)", "true");
[all …]
Dinbuilt_function_proto.js25 shouldBe("Object.prototype.toString.__proto__","Function.prototype");
26 shouldBe("Object.prototype.valueOf.__proto__","Function.prototype");
27 shouldBe("Array.prototype.toString.__proto__","Function.prototype");
28 shouldBe("Array.prototype.toLocaleString.__proto__","Function.prototype");
29 shouldBe("Array.prototype.concat.__proto__","Function.prototype");
30 shouldBe("Array.prototype.join.__proto__","Function.prototype");
31 shouldBe("Array.prototype.pop.__proto__","Function.prototype");
32 shouldBe("Array.prototype.push.__proto__","Function.prototype");
33 shouldBe("Array.prototype.reverse.__proto__","Function.prototype");
34 shouldBe("Array.prototype.shift.__proto__","Function.prototype");
[all …]
Doperators.js144 shouldBe("+9", "9");
145 shouldBe("var i = 10; +i", "10");
148 shouldBe("-11", "-11");
149 shouldBe("var i = 12; -i", "-12");
152 shouldBe("var i = 0; ++i;", "1");
153 shouldBe("var i = 0; ++i; i", "1");
154 shouldBe("var i = 0; i++;", "0");
155 shouldBe("var i = 0; i++; i", "1");
156 shouldBe("var i = true; i++", "1");
157 shouldBe("var i = true; i++; i", "2");
[all …]
DRegExp.js25 shouldBe("(new RegExp()).source", "'(?:)'");
26 shouldBe("Boolean(new RegExp())", "true");
30 shouldBe("RegExp(/x/).source", "'x'");
32 shouldBe("RegExp('x', 'g').global", "true");
33 shouldBe("RegExp('x').source", "'x'");
36 shouldBe("new RegExp('x').source", "'x'");
43 shouldBe("typeof (/a/).global", "'boolean'");
49 shouldBe("rg.toString()", "'/a/g'");
50 shouldBe("ri.toString()", "'/a/i'");
51 shouldBe("rm.toString()", "'/a/m'");
[all …]
DArray.js28 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'");
[all …]
Dmath.js37 shouldBe("String()+Math.E", "'2.718281828459045'");
38 shouldBe("String()+Math.LN2", "'0.6931471805599453'");
39 shouldBe("String()+Math.LN10", "'2.302585092994046'");
40 shouldBe("String()+Math.LOG2E", "'1.4426950408889634'");
41 shouldBe("String()+Math.LOG10E", "'0.4342944819032518'");
42 shouldBe("String()+Math.PI", "'3.141592653589793'");
43 shouldBe("String()+Math.SQRT1_2", "'0.7071067811865476'");
44 shouldBe("String()+Math.SQRT2", "'1.4142135623730951'");
46 shouldBe("String()+Number.NaN", "'NaN'");
47 shouldBe("String()+Number.NEGATIVE_INFINITY", "'-Infinity'");
[all …]
DGlobalObject.js29 shouldBe("h.charCodeAt(1)", "239");
30 shouldBe("u.charCodeAt(1)", "4660");
31 shouldBe("escape(h)", "'a%EFc'");
32 shouldBe("escape(u)", "'a%u1234c'");
33 shouldBe("escape(z)", "'%00'");
34 shouldBe("unescape(escape(h))", "h");
35 shouldBe("unescape(escape(u))", "u");
36 shouldBe("unescape(escape(z))", "z");
47 shouldBe('isNaN(parseInt("Hello", 8))', "true");
48 shouldBe('isNaN(parseInt("FFF", 10))', "true");
[all …]
/external/v8/test/webkit/fast/regex/
Dpcre-test-4.js31 shouldBe('regex0.exec(input0);', 'results');
34 shouldBe('regex0.exec(input1);', 'results');
37 shouldBe('regex0.exec(input2);', 'results');
41 shouldBe('regex0.exec(input3);', 'results');
46 shouldBe('regex1.exec(input0);', 'results');
49 shouldBe('regex1.exec(input1);', 'results');
52 shouldBe('regex1.exec(input2);', 'results');
56 shouldBe('regex1.exec(input3);', 'results');
59 shouldBe('regex1.exec(input4);', 'results');
64 shouldBe('regex2.exec(input0);', 'results');
[all …]
Ddotstar.js28 shouldBe("regexp1.exec('blah')", "['blah']");
29 shouldBe("regexp1.exec('1blah')", "['1blah']");
30 shouldBe("regexp1.exec('blah1')", "['blah1']");
31 shouldBe("regexp1.exec('blah blah blah')", "['blah blah blah']");
32 shouldBe("regexp1.exec('blah\\nsecond')", "['blah']");
33 shouldBe("regexp1.exec('first\\nblah')", "['blah']");
34 shouldBe("regexp1.exec('first\\nblah\\nthird')", "['blah']");
35 shouldBe("regexp1.exec('first\\nblah2\\nblah3')", "['blah2']");
39 shouldBe("regexp2.exec('blah')", "['blah']");
40 shouldBe("regexp2.exec('1blah')", "['1blah']");
[all …]
Dparentheses.js27 shouldBe("regexp1.exec('abc')", "['ab','a','b']");
30 shouldBe("regexp2.exec('abacadabe')", "['abe','ab','b','b']");
33 shouldBe("regexp3.exec('abacadabe')", "['abe','ab','b',undefined]");
36 shouldBe("regexp4.exec('abacadabe')", "['abe','ab','b',undefined]");
39 shouldBe("regexp5.exec('abacadabe')", "['abe','ab','b','b',undefined,undefined]");
42 shouldBe("regexp6.exec('abcde')", "['ab','ab','b','b',undefined,undefined]");
45 shouldBe("regexp7.exec('abc')", "['abc','ab','b']");
48 shouldBe("regexp8.exec('bcaddxqy')" , "['qy','q','q','y']");
51 shouldBe("regexp9.exec('asdfjejgsdflaksdfjkeljghkjea')", "['a','a',undefined]");
54 shouldBe("regexp10.exec('asdfjejgsdflaksdfjkeljghat')", "['at']");
[all …]
/external/v8/test/webkit/fast/js/
Darray-functions-non-arrays.js96 shouldBe("properties(['b', 'a'])", "'0:b, 1:a, length:2(DontDelete, DontEnum)'");
97 shouldBe("properties({ length:2, 0:'b', 1:'a' })", "'0:b, 1:a, length:2'");
99 shouldBe("properties(new OneItemConstructor)", "'0:a(FromPrototype), length:1(FromPrototype)'");
100 shouldBe("properties(new TwoItemConstructor)", "'0:b(FromPrototype), 1:a(FromPrototype), length:2(F…
102 shouldBe("Array.prototype.toString.call({})", '"' + ({}).toString() + '"');
103 shouldBe("Array.prototype.toString.call(new Date)", '"' + Object.prototype.toString.call(new Date) …
104 shouldBe("Array.prototype.toString.call({sort: function() { return 'sort' }})", '"' + Object.protot…
105 shouldBe("Array.prototype.toString.call({join: function() { return 'join' }})", '"join"');
106 shouldBe("Array.prototype.toString.call({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length…
107 shouldBe("({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3}).toString()", '"a,b,c"');
[all …]
DObject-defineProperty.js26 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1}…
28 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {}), 'foo…
30 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {get:unde…
32 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
34 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
36 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
38 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
40 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
42 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty({}, 'foo', {value:1,…
44 shouldBe("JSON.stringify(Object.getOwnPropertyDescriptor(Object.defineProperty([1,2,3], 'foo', {val…
[all …]
Darguments.js78 shouldBe("access_1(1, 2, 3)", "1");
79 shouldBe("access_2(1, 2, 3)", "2");
80 shouldBe("access_3(1, 2, 3)", "3");
81 shouldBe("access_4(1, 2, 3)", "undefined");
82 shouldBe("access_5(1, 2, 3)", "undefined");
84 shouldBe("access_1(1)", "1");
85 shouldBe("access_2(1)", "undefined");
86 shouldBe("access_3(1)", "undefined");
87 shouldBe("access_4(1)", "undefined");
88 shouldBe("access_5(1)", "undefined");
[all …]
Dregexp-no-extensions.js30 shouldBe('/\\x{41}/.exec("yA1")', 'null');
31 shouldBe('/[\\x{41}]/.exec("yA1").toString()', '"1"');
32 shouldBe('/\\x1g/.exec("x1g").toString()', '"x1g"');
33 shouldBe('/[\\x1g]/.exec("x").toString()', '"x"');
34 shouldBe('/[\\x1g]/.exec("1").toString()', '"1"');
35 shouldBe('/\\2147483648/.exec(String.fromCharCode(140) + "7483648").toString()', 'String.fromCharCo…
36 shouldBe('/\\4294967296/.exec("\\"94967296").toString()', '"\\"94967296"');
37 shouldBe('/\\8589934592/.exec("\\\\8589934592").toString()', '"\\\\8589934592"');
38 shouldBe('"\\nAbc\\n".replace(/(\\n)[^\\n]+$/, "$1")', '"\\nAbc\\n"');
39 shouldBe('/x$/.exec("x\\n")', 'null');
[all …]
Dregexp-unicode-handling.js56 shouldBe("cy('Re: Moose')", "'Moose'")
57 shouldBe("cy('\\u8f6c\\u53d1: Moose')", "'Moose'")
72 shouldBe("inlineRe.source", "newFromInlineRe.source")
73 shouldBe("inlineRe.source", "evalFromInlineRe.source")
74 shouldBe("inlineRe.source", "evalInlineRe.source")
75 shouldBe("inlineRe.source", "newFromEvalInlineRe.source")
76 shouldBe("inlineRe.source", "evalFromEvalInlineRe.source")
77 shouldBe("inlineRe.source", "explicitRe.source")
78 shouldBe("inlineRe.source", "newFromExplicitRe.source")
79 shouldBe("inlineRe.source", "evalFromExplicitRe.source")
[all …]

12345678910>>...18