/external/webkit/V8Binding/v8/test/mjsunit/ |
D | number-tostring.js | 30 assertEquals("NaN", (NaN).toString()); 31 assertEquals("Infinity", (1/0).toString()); 32 assertEquals("-Infinity", (-1/0).toString()); 33 assertEquals("0", (0).toString()); 34 assertEquals("9", (9).toString()); 35 assertEquals("90", (90).toString()); 36 assertEquals("90.12", (90.12).toString()); 37 assertEquals("0.1", (0.1).toString()); 38 assertEquals("0.01", (0.01).toString()); 39 assertEquals("0.0123", (0.0123).toString()); [all …]
|
D | regexp-pcre.js | 1646 assertEquals("abc", res[1].exec("abc"), 0); 1647 assertEquals("abc", res[1].exec("defabc"), 1); 1648 assertEquals("abc", res[1].exec("Aabc"), 2); 1649 assertEquals(null, res[1].exec("*** Failers", 3)); 1650 assertEquals("abc", res[1].exec("Adefabc"), 4); 1651 assertEquals("ABC", res[1].exec("ABC"), 5); 1652 assertEquals("abc", res[2].exec("abc"), 6); 1653 assertEquals(null, res[2].exec("Aabc", 7)); 1654 assertEquals(null, res[2].exec("*** Failers", 8)); 1655 assertEquals(null, res[2].exec("defabc", 9)); [all …]
|
D | smi-ops.js | 37 assertEquals(42, OBJ_42.valueOf()); 57 assertEquals(1, Add1(0)); // fast case 58 assertEquals(1, Add1Reversed(0)); // fast case 59 assertEquals(SMI_MAX + ONE, Add1(SMI_MAX), "smimax + 1"); 60 assertEquals(SMI_MAX + ONE, Add1Reversed(SMI_MAX), "1 + smimax"); 61 assertEquals(42 + ONE, Add1(OBJ_42)); // non-smi 62 assertEquals(42 + ONE, Add1Reversed(OBJ_42)); // non-smi 64 assertEquals(100, Add100(0)); // fast case 65 assertEquals(100, Add100Reversed(0)); // fast case 66 assertEquals(SMI_MAX + ONE_HUNDRED, Add100(SMI_MAX), "smimax + 100"); [all …]
|
D | str-to-num.js | 35 assertEquals(123, toNumber(" 123")); 36 assertEquals(123, toNumber("\n123")); 37 assertEquals(123, toNumber("\r123")); 38 assertEquals(123, toNumber("\t123")); 39 assertEquals(123, toNumber("\f123")); 41 assertEquals(123, toNumber("123 ")); 42 assertEquals(123, toNumber("123\n")); 43 assertEquals(123, toNumber("123\r")); 44 assertEquals(123, toNumber("123\t")); 45 assertEquals(123, toNumber("123\f")); [all …]
|
D | toint32.js | 32 assertEquals(0, toInt32(Infinity), "Inf"); 33 assertEquals(0, toInt32(-Infinity), "-Inf"); 34 assertEquals(0, toInt32(NaN), "NaN"); 35 assertEquals(0, toInt32(0.0), "zero"); 36 assertEquals(0, toInt32(-0.0), "-zero"); 38 assertEquals(0, toInt32(Number.MIN_VALUE)); 39 assertEquals(0, toInt32(-Number.MIN_VALUE)); 40 assertEquals(0, toInt32(0.1)); 41 assertEquals(0, toInt32(-0.1)); 42 assertEquals(1, toInt32(1), "one"); [all …]
|
D | string-add.js | 28 assertEquals("ab", "a" + "b", "ll"); 30 assertEquals("12", "1" + "2", "dd"); 31 assertEquals("123", "1" + "2" + "3", "ddd"); 32 assertEquals("123", 1 + "2" + "3", "ndd"); 33 assertEquals("123", "1" + 2 + "3", "dnd"); 34 assertEquals("123", "1" + "2" + 3, "ddn"); 36 assertEquals("123", "1" + 2 + 3, "dnn"); 37 assertEquals("123", 1 + "2" + 3, "ndn"); 38 assertEquals("33", 1 + 2 + "3", "nnd"); 41 assertEquals("12", x + 2, "vn"); [all …]
|
D | string-index.js | 33 assertEquals("Foo", foo); 34 assertEquals("F", foo[0]); 35 assertEquals("o", foo[1]); 36 assertEquals("o", foo[2]); 38 assertEquals("F", foo["0" + ""], "string index"); 39 assertEquals("o", foo["1"], "string index"); 40 assertEquals("o", foo["2"], "string index"); 42 assertEquals("undefined", typeof(foo[3]), "out of range"); 44 assertEquals("undefined", typeof(foo[-1]), "known failure in SpiderMonkey 1.5"); 45 assertEquals("undefined", typeof(foo[-2]), "negative index"); [all …]
|
D | regexp-static.js | 46 assertEquals(s, RegExp.input); 47 assertEquals('123.456', RegExp.lastMatch); 48 assertEquals('456', RegExp.lastParen); 49 assertEquals('abc', RegExp.leftContext); 50 assertEquals('def', RegExp.rightContext); 52 assertEquals(s, RegExp['$_']); 53 assertEquals('123.456', RegExp['$&']); 54 assertEquals('456', RegExp['$+']); 55 assertEquals('abc', RegExp['$`']); 56 assertEquals('def', RegExp["$'"]); [all …]
|
D | to-precision.js | 29 assertEquals("1e+27", (1.2345e+27).toPrecision(1)); 30 assertEquals("1.2e+27", (1.2345e+27).toPrecision(2)); 31 assertEquals("1.23e+27", (1.2345e+27).toPrecision(3)); 32 assertEquals("1.234e+27", (1.2345e+27).toPrecision(4)); 33 assertEquals("1.2345e+27", (1.2345e+27).toPrecision(5)); 34 assertEquals("1.23450e+27", (1.2345e+27).toPrecision(6)); 35 assertEquals("1.234500e+27", (1.2345e+27).toPrecision(7)); 37 assertEquals("-1e+27", (-1.2345e+27).toPrecision(1)); 38 assertEquals("-1.2e+27", (-1.2345e+27).toPrecision(2)); 39 assertEquals("-1.23e+27", (-1.2345e+27).toPrecision(3)); [all …]
|
D | json.js | 31 assertEquals(alternative, n1.toJSON()); 40 assertEquals(0, arguments.length); 41 assertEquals(this, n4); 44 assertEquals(null, n4.toJSON()); 48 assertEquals(3, (3).toJSON()); 49 assertEquals(3, (3).toJSON(true)); 50 assertEquals(4, (new Number(4)).toJSON()); 54 assertEquals(true, (true).toJSON()); 55 assertEquals(true, (true).toJSON(false)); 56 assertEquals(false, (false).toJSON()); [all …]
|
D | length.js | 32 assertEquals(0, Array.prototype.length, "Array.prototype.length"); 33 assertEquals(1, Array.length, "Array.length"); 34 assertEquals(1, Array.prototype.concat.length, "Array.prototype.concat.length"); 35 assertEquals(1, Array.prototype.join.length, "Array.prototype.join.length"); 36 assertEquals(1, Array.prototype.push.length, "Array.prototype.push.length"); 37 assertEquals(1, Array.prototype.unshift.length, "Array.prototype.unshift.length"); 38 assertEquals(1, Boolean.length, "Boolean.length"); 39 assertEquals(1, Error.length, "Error.length"); 40 assertEquals(1, EvalError.length, "EvalError.length"); 41 assertEquals(1, Function.length, "Function.length"); [all …]
|
D | debug-sourceinfo.js | 89 assertEquals(start_a, Debug.sourcePosition(a)); 90 assertEquals(start_b, Debug.sourcePosition(b)); 91 assertEquals(start_c, Debug.sourcePosition(c)); 92 assertEquals(start_d, Debug.sourcePosition(d)); 110 assertEquals(position + 1, location.position); 112 assertEquals(column + 1, location.column); 114 assertEquals(line + 1, location.line); 115 assertEquals(0, location.column); 118 assertEquals(0, location.position); 119 assertEquals(0, location.line); [all …]
|
D | smi-negative-zero.js | 40 assertEquals(one / (-zero), -Infinity, "one / -0 I"); 42 assertEquals(one / (zero * minus_one), -Infinity, "one / -1"); 43 assertEquals(one / (minus_one * zero), -Infinity, "one / -0 II"); 44 assertEquals(one / (zero * zero), Infinity, "one / 0 I"); 45 assertEquals(one / (minus_one * minus_one), 1, "one / 1"); 47 assertEquals(one / (zero / minus_one), -Infinity, "one / -0 III"); 48 assertEquals(one / (zero / one), Infinity, "one / 0 II"); 50 assertEquals(one / (minus_four % two), -Infinity, "foo"); 51 assertEquals(one / (minus_four % minus_two), -Infinity, "foo"); 52 assertEquals(one / (four % two), Infinity, "foo"); [all …]
|
D | arguments-opt.js | 43 assertEquals(0, L0()); 44 assertEquals(1, L0(1)); 45 assertEquals(2, L0(1,2)); 46 assertEquals(5, L0(1,2,3,4,5)); 48 assertEquals(0, L1()); 49 assertEquals(1, L1(1)); 50 assertEquals(2, L1(1,2)); 51 assertEquals(5, L1(1,2,3,4,5)); 53 assertEquals(0, L5()); 54 assertEquals(1, L5(1)); [all …]
|
D | escape.js | 37 assertEquals(unescaped, escape(unescaped)); 39 assertEquals("%20/%20", escape(" / ")); 41 assertEquals("%000", escape("\0" + "0")); 43 assertEquals("A%20B%u1234%00%20C", escape(String.fromCharCode(0x41, 0x20, 0x42, 0x1234, 0, 0x20, 0x… 45 assertEquals("%u0123", escape(String.fromCharCode(0x123))); 47 assertEquals("%uABCD", escape(String.fromCharCode(0xabcd))); 48 assertEquals("%AB", escape(String.fromCharCode(0xab))); 49 assertEquals("%0A", escape("\n")); 64 assertEquals(s, unescape(escape(s))); 74 assertEquals(example, unescape(escape(example))); [all …]
|
D | touint32.js | 32 assertEquals(0, ToUInt32(0), "0"); 33 assertEquals(0, ToUInt32(-0), "-0"); 34 assertEquals(0, ToUInt32(Infinity), "Infinity"); 35 assertEquals(0, ToUInt32(-Infinity), "-Infinity"); 36 assertEquals(0, ToUInt32(NaN), "NaN"); 38 assertEquals(0, ToUInt32(Number.MIN_VALUE), "MIN"); 39 assertEquals(0, ToUInt32(-Number.MIN_VALUE), "-MIN"); 40 assertEquals(0, ToUInt32(0.1), "0.1"); 41 assertEquals(0, ToUInt32(-0.1), "-0.1"); 42 assertEquals(1, ToUInt32(1), "1"); [all …]
|
D | math-min-max.js | 30 assertEquals(Number.POSITIVE_INFINITY, Math.min()); 31 assertEquals(1, Math.min(1)); 32 assertEquals(1, Math.min(1, 2)); 33 assertEquals(1, Math.min(2, 1)); 34 assertEquals(1, Math.min(1, 2, 3)); 35 assertEquals(1, Math.min(3, 2, 1)); 36 assertEquals(1, Math.min(2, 3, 1)); 40 assertEquals(1, Math.min(2, 3, '1')); 41 assertEquals(1, Math.min(3, o, 2)); 42 assertEquals(Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY / Math.min(-0, +0)); [all …]
|
D | debug-backtrace.js | 100 assertEquals(0, backtrace.fromFrame); 101 assertEquals(4, backtrace.toFrame); 102 assertEquals(4, backtrace.totalFrames); 104 assertEquals(4, frames.length); 106 assertEquals('frame', frames[i].type); 108 assertEquals(0, frames[0].index); 109 assertEquals("f", response.lookup(frames[0].func.ref).name); 110 assertEquals(1, frames[1].index); 111 assertEquals("", response.lookup(frames[1].func.ref).name); 112 assertEquals("m", response.lookup(frames[1].func.ref).inferredName); [all …]
|
D | arguments.js | 40 assertEquals(0, argc0()); 41 assertEquals(1, argc0(1)); 42 assertEquals(2, argc0(1, 2)); 43 assertEquals(3, argc0(1, 2, 3)); 44 assertEquals(0, argc1()); 45 assertEquals(1, argc1(1)); 46 assertEquals(2, argc1(1, 2)); 47 assertEquals(3, argc1(1, 2, 3)); 48 assertEquals(0, argc2()); 49 assertEquals(1, argc2(1)); [all …]
|
D | string-lastindexof.js | 35 assertEquals(10, s.lastIndexOf("test", Infinity), "tinf"); 36 assertEquals(10, s.lastIndexOf("test", MAX_DOUBLE), "tmaxdouble"); 37 assertEquals(10, s.lastIndexOf("test", MAX_SMI), "tmaxsmi"); 38 assertEquals(10, s.lastIndexOf("test", s.length * 2), "t2length"); 39 assertEquals(10, s.lastIndexOf("test", 15), "t15"); 40 assertEquals(10, s.lastIndexOf("test", 14), "t14"); 41 assertEquals(10, s.lastIndexOf("test", 10), "t10"); 42 assertEquals(5, s.lastIndexOf("test", 9), "t9"); 43 assertEquals(5, s.lastIndexOf("test", 6), "t6"); 44 assertEquals(5, s.lastIndexOf("test", 5), "t5"); [all …]
|
D | array-length.js | 31 assertEquals('undefined', typeof a[0]); 32 assertEquals('undefined', typeof a[1]); 33 assertEquals('undefined', typeof a[2]); 34 assertEquals('undefined', typeof a[3]); 40 assertEquals(0, a[0]); 41 assertEquals(1, a[1]); 42 assertEquals('undefined', typeof a[2]); 43 assertEquals('undefined', typeof a[3]); 52 assertEquals(2000001, a.length); 54 assertEquals(0, a.length); [all …]
|
D | string-indexof.js | 30 assertEquals(0, s.indexOf("t")); 31 assertEquals(3, s.indexOf("t", 1)); 32 assertEquals(5, s.indexOf("t", 4)); 33 assertEquals(1, s.indexOf("e")); 34 assertEquals(2, s.indexOf("s")); 36 assertEquals(5, s.indexOf("test", 4)); 37 assertEquals(5, s.indexOf("test", 5)); 38 assertEquals(10, s.indexOf("test", 6)); 39 assertEquals(0, s.indexOf("test", 0)); 40 assertEquals(0, s.indexOf("test", -1)); [all …]
|
D | array-splice.js | 128 assertEquals(pos, a.length); 130 assertEquals(pos + 1, a.length); 134 assertEquals(pos - 20, c.length); 135 assertEquals(21, a.length); 149 assertEquals("zero,baz,two", a.join(",")); 155 assertEquals("con", a[pos]); 156 assertEquals(pos + 1, a.length); 159 assertEquals("cat", b[0]); 161 assertEquals("con", ab[pos]); 162 assertEquals(pos + 2, ab.length); [all …]
|
D | switch.js | 43 assertEquals("f1", f1(0), "default-switch.0"); 44 assertEquals("f1", f1(1), "default-switch.1"); 67 assertEquals("zero", f2(0), "0-1-switch.0"); 68 assertEquals("one", f2(1), "0-1-switch.1"); 69 assertEquals("default", f2(7), "0-1-switch.2"); 70 assertEquals("default", f2(-1), "0-1-switch.-1"); 71 assertEquals("default", f2(NaN), "0-1-switch.NaN"); 72 assertEquals("default", f2(Math.pow(2,34)), "0-1-switch.largeNum"); 73 assertEquals("default", f2("0"), "0-1-switch.string"); 74 assertEquals("default", f2(false), "0-1-switch.bool"); [all …]
|
/external/webkit/V8Binding/v8/test/mjsunit/regress/ |
D | regress-678525.js | 28 assertEquals(0, '\0'.charCodeAt(0)); 29 assertEquals(1, '\1'.charCodeAt(0)); 30 assertEquals(2, '\2'.charCodeAt(0)); 31 assertEquals(3, '\3'.charCodeAt(0)); 32 assertEquals(4, '\4'.charCodeAt(0)); 33 assertEquals(5, '\5'.charCodeAt(0)); 34 assertEquals(6, '\6'.charCodeAt(0)); 35 assertEquals(7, '\7'.charCodeAt(0)); 36 assertEquals(56, '\8'.charCodeAt(0)); 38 assertEquals('\010', '\10'); [all …]
|