Home
last modified time | relevance | path

Searched refs:assertEquals (Results 1 – 25 of 3322) sorted by relevance

12345678910>>...133

/external/v8/test/mjsunit/
Dnumber-tostring.js30 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 …]
Dstr-to-num.js43 assertEquals('0000000000', repeat('0', 10));
47 assertEquals(123, toNumber(" 123"));
48 assertEquals(123, toNumber("\n123"));
49 assertEquals(123, toNumber("\r123"));
50 assertEquals(123, toNumber("\t123"));
51 assertEquals(123, toNumber("\f123"));
53 assertEquals(123, toNumber("123 "));
54 assertEquals(123, toNumber("123\n"));
55 assertEquals(123, toNumber("123\r"));
56 assertEquals(123, toNumber("123\t"));
[all …]
Dsmi-ops-inlined.js39 assertEquals(42, OBJ_42.valueOf());
59 assertEquals(1, Add1(0)); // fast case
60 assertEquals(1, Add1Reversed(0)); // fast case
61 assertEquals(SMI_MAX + ONE, Add1(SMI_MAX), "smimax + 1");
62 assertEquals(SMI_MAX + ONE, Add1Reversed(SMI_MAX), "1 + smimax");
63 assertEquals(42 + ONE, Add1(OBJ_42)); // non-smi
64 assertEquals(42 + ONE, Add1Reversed(OBJ_42)); // non-smi
66 assertEquals(100, Add100(0)); // fast case
67 assertEquals(100, Add100Reversed(0)); // fast case
68 assertEquals(SMI_MAX + ONE_HUNDRED, Add100(SMI_MAX), "smimax + 100");
[all …]
Dsmi-ops.js37 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 …]
Dmath-pow.js33 assertEquals(4, Math.pow(2, 2));
34 assertEquals(2147483648, Math.pow(2, 31));
35 assertEquals(0.25, Math.pow(2, -2));
36 assertEquals(0.0625, Math.pow(2, -4));
37 assertEquals(1, Math.pow(1, 100));
38 assertEquals(0, Math.pow(0, 1000));
41 assertEquals(NaN, Math.pow(2, NaN));
42 assertEquals(NaN, Math.pow(+0, NaN));
43 assertEquals(NaN, Math.pow(-0, NaN));
44 assertEquals(NaN, Math.pow(Infinity, NaN));
[all …]
Dnumops-fuzz.js31 assertEquals(0, x /= (tmp = 798469700.4090232, tmp));
32 assertEquals(0, x *= (2714102322.365509));
33 assertEquals(0, x *= x);
34 assertEquals(139516372, x -= (tmp = -139516372, tmp));
35 assertEquals(1, x /= (x%(2620399703.344006)));
36 assertEquals(0, x >>>= x);
37 assertEquals(-2772151192.8633175, x -= (tmp = 2772151192.8633175, tmp));
38 assertEquals(-2786298206.8633175, x -= (14147014));
39 assertEquals(1509750523, x |= ((1073767916)-(tmp = 919311632.2789925, tmp)));
40 assertEquals(2262404051.926751, x += ((752653528.9267509)%x));
[all …]
Dtoint32.js32 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 …]
Dstring-add.js28 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 …]
Ddate.js31 assertEquals(1111, date0.getTime());
32 assertEquals(date0.getTime(), date1.getTime());
34 assertEquals(1000, date2.getTime());
41 assertEquals(date0, date1);
42 assertEquals(date1, date2);
43 assertEquals(date2, date3);
48 assertEquals(8.64e15, dMax.getTime());
49 assertEquals(275760, dMax.getFullYear());
50 assertEquals(8, dMax.getMonth());
51 assertEquals(13, dMax.getUTCDate());
[all …]
Darray-indexing.js53 assertEquals(-1, [].indexOf(1));
54 assertEquals(-1, array.indexOf(4));
55 assertEquals(-1, array.indexOf(3, array.length));
57 assertEquals(2, array.indexOf(3));
59 assertEquals(0, array.indexOf(1, -17));
61 assertEquals(3, array.indexOf(1, -11));
63 assertEquals(3, array.indexOf(1, 1));
64 assertEquals(3, array.indexOf(1, 3));
65 assertEquals(6, array.indexOf(1, 4));
68 assertEquals(3, undef_array.indexOf(undefined));
[all …]
Dmath-min-max.js32 assertEquals(Infinity, Math.min());
33 assertEquals(1, Math.min(1));
34 assertEquals(1, Math.min(1, 2));
35 assertEquals(1, Math.min(2, 1));
36 assertEquals(1, Math.min(1, 2, 3));
37 assertEquals(1, Math.min(3, 2, 1));
38 assertEquals(1, Math.min(2, 3, 1));
39 assertEquals(1.1, Math.min(1.1, 2.2, 3.3));
40 assertEquals(1.1, Math.min(3.3, 2.2, 1.1));
41 assertEquals(1.1, Math.min(2.2, 3.3, 1.1));
[all …]
Dregexp-static.js34 assertEquals(s, RegExp.input);
35 assertEquals('123.456', RegExp.lastMatch);
36 assertEquals('456', RegExp.lastParen);
37 assertEquals('abc', RegExp.leftContext);
38 assertEquals('def', RegExp.rightContext);
40 assertEquals(s, RegExp['$_']);
41 assertEquals('123.456', RegExp['$&']);
42 assertEquals('456', RegExp['$+']);
43 assertEquals('abc', RegExp['$`']);
44 assertEquals('def', RegExp["$'"]);
[all …]
Dto-precision.js29 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 …]
Dstring-index.js33 assertEquals("Foo", foo);
34 assertEquals("F", foo[0]);
35 assertEquals("o", foo[1]);
36 assertEquals("o", foo[2]);
40 assertEquals("F", foo[0]);
41 assertEquals("o", foo[1]);
42 assertEquals("o", foo[2]);
43 assertEquals("F", (foo[0] + "BarBazQuuxFooBarQuux")[0]);
46 assertEquals("F", foo["0" + ""], "string index");
47 assertEquals("o", foo["1"], "string index");
[all …]
Dint32-ops.js41 assertEquals(42, OBJ_42.valueOf());
61 assertEquals(1, Add1(0)); // fast case
62 assertEquals(1, Add1Reversed(0)); // fast case
63 assertEquals(SMI_MAX + ONE, Add1(SMI_MAX), "smimax + 1");
64 assertEquals(SMI_MAX + ONE, Add1Reversed(SMI_MAX), "1 + smimax");
65 assertEquals(42 + ONE, Add1(OBJ_42)); // non-smi
66 assertEquals(42 + ONE, Add1Reversed(OBJ_42)); // non-smi
68 assertEquals(100, Add100(0)); // fast case
69 assertEquals(100, Add100Reversed(0)); // fast case
70 assertEquals(SMI_MAX + ONE_HUNDRED, Add100(SMI_MAX), "smimax + 100");
[all …]
Djson.js29 assertEquals("1970-01-01T00:00:00.000Z", new Date(0).toJSON());
30 assertEquals("1979-01-11T08:00:00.000Z", new Date("1979-01-11 08:00 GMT").toJSON());
31 assertEquals("2005-05-05T05:05:05.000Z", new Date("2005-05-05 05:05:05 GMT").toJSON());
34 assertEquals("foo", n1.toJSON());
40 assertEquals(0, arguments.length);
41 assertEquals(this, n4);
44 assertEquals(null, n4.toJSON());
47 assertEquals("[object JSON]", Object.prototype.toString.call(JSON));
52 assertEquals(42, d1.toJSON());
57 assertEquals(null, d2.toJSON());
[all …]
/external/libphonenumber/java/test/com/android/i18n/phonenumbers/
DAsYouTypeFormatterTest.java31 assertEquals("+", formatter.inputDigit('+')); in testInvalidRegion()
32 assertEquals("+4", formatter.inputDigit('4')); in testInvalidRegion()
33 assertEquals("+48 ", formatter.inputDigit('8')); in testInvalidRegion()
34 assertEquals("+48 8", formatter.inputDigit('8')); in testInvalidRegion()
35 assertEquals("+48 88", formatter.inputDigit('8')); in testInvalidRegion()
36 assertEquals("+48 88 1", formatter.inputDigit('1')); in testInvalidRegion()
37 assertEquals("+48 88 12", formatter.inputDigit('2')); in testInvalidRegion()
38 assertEquals("+48 88 123", formatter.inputDigit('3')); in testInvalidRegion()
39 assertEquals("+48 88 123 1", formatter.inputDigit('1')); in testInvalidRegion()
40 assertEquals("+48 88 123 12", formatter.inputDigit('2')); in testInvalidRegion()
[all …]
/external/guava/guava-tests/test/com/google/common/io/
DFilesSimplifyPathTest.java39 assertEquals(".", simplifyPath("")); in testSimplifyEmptyString()
43 assertEquals(".", simplifyPath(".")); in testSimplifyDot()
47 assertEquals(" ", simplifyPath(" ")); in testSimplifyWhiteSpace()
51 assertEquals("x", simplifyPath("x")); in testSimplify2()
55 assertEquals("/a/b/c/d", simplifyPath("/a/b/c/d")); in testSimplify3()
59 assertEquals("/a/b/c/d", simplifyPath("/a/b/c/d/")); in testSimplify4()
63 assertEquals("/a/b", simplifyPath("/a//b")); in testSimplify5()
67 assertEquals("/a/b", simplifyPath("//a//b/")); in testSimplify6()
71 assertEquals("/", simplifyPath("/..")); in testSimplify7()
75 assertEquals("/", simplifyPath("/././././")); in testSimplify8()
[all …]
/external/apache-harmony/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/
DDatabaseMetaDataTest.java30 assertEquals(attributeNoNulls, 0); in testPublicStatics()
31 assertEquals(attributeNullable, 1); in testPublicStatics()
32 assertEquals(attributeNullableUnknown, 2); in testPublicStatics()
33 assertEquals(bestRowNotPseudo, 1); in testPublicStatics()
34 assertEquals(bestRowPseudo, 2); in testPublicStatics()
35 assertEquals(bestRowSession, 2); in testPublicStatics()
36 assertEquals(bestRowTemporary, 0); in testPublicStatics()
37 assertEquals(bestRowTransaction, 1); in testPublicStatics()
38 assertEquals(bestRowUnknown, 0); in testPublicStatics()
39 assertEquals(columnNoNulls, 0); in testPublicStatics()
[all …]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/
DLongTest.java42 assertEquals("Returned incorrect byte value", 127, l.byteValue()); in test_byteValue()
43 assertEquals("Returned incorrect byte value", -1, new Long(Long.MAX_VALUE) in test_byteValue()
54 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Long(-2L) in test_compareToLjava_lang_Long()
72 assertEquals("Returned incorrect value for hex string", 255L, Long.decode( in test_decodeLjava_lang_String2()
74 assertEquals("Returned incorrect value for dec string", -89000L, Long.decode( in test_decodeLjava_lang_String2()
76 assertEquals("Returned incorrect value for 0 decimal", 0, Long.decode("0") in test_decodeLjava_lang_String2()
78 assertEquals("Returned incorrect value for 0 hex", 0, Long.decode("0x0") in test_decodeLjava_lang_String2()
204 assertEquals("Parsed to incorrect long value", 89000000005L, l); in test_parseLongLjava_lang_String2()
205 assertEquals("Returned incorrect value for 0", 0, Long.parseLong("0")); in test_parseLongLjava_lang_String2()
235 assertEquals("Returned incorrect value", in test_parseLongLjava_lang_StringI()
[all …]
DIntegerTest.java41 assertEquals("Returned incorrect byte value", -1, new Integer(65535) in test_byteValue()
43 assertEquals("Returned incorrect byte value", 127, new Integer(127) in test_byteValue()
54 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Integer(-2) in test_compareToLjava_lang_Integer()
72 assertEquals("Failed for 132233", in test_decodeLjava_lang_String2()
74 assertEquals("Failed for 07654321", in test_decodeLjava_lang_String2()
80 assertEquals("Failed for -23", -23, Integer.decode("-23").intValue()); in test_decodeLjava_lang_String2()
81 assertEquals("Returned incorrect value for 0 decimal", 0, Integer in test_decodeLjava_lang_String2()
83 assertEquals("Returned incorrect value for 0 hex", 0, Integer.decode("0x0") in test_decodeLjava_lang_String2()
205 assertEquals("Returned incorrect double value", 2147483647.0, new Integer(2147483647) in test_doubleValue2()
207 assertEquals("Returned incorrect double value", -2147483647.0, new Integer(-2147483647) in test_doubleValue2()
[all …]
DCharacter_UnicodeBlockTest.java24 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char)0x0)); in test_ofC()
25 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char)0x7f)); in test_ofC()
26assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char)0x80)); in test_ofC()
27assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char)0xff)); in test_ofC()
28assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char)0x100)); in test_ofC()
29assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char)0x17f)); in test_ofC()
30assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char)0x180)); in test_ofC()
31assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char)0x24f)); in test_ofC()
32 assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char)0x250)); in test_ofC()
33 assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char)0x2af)); in test_ofC()
[all …]
/external/v8/test/mjsunit/compiler/
Dcountoperation.js34 assertEquals(43, ++a);
35 assertEquals(43, a);
36 assertEquals(43, a++);
37 assertEquals(44, a);
38 assertEquals(43, ++b.x);
39 assertEquals(43, b.x);
40 assertEquals(43, b.x++);
41 assertEquals(44, b.x);
42 assertEquals(45, ++b[c]);
43 assertEquals(45, b[c]);
[all …]
/external/v8/test/mjsunit/harmony/
Dblock-scoping.js40 assertEquals(1, x)
41 assertEquals(undefined, y)
54 assertEquals(1, eval('one'));
55 assertEquals(2, eval('x'));
56 assertEquals(3, eval('y'));
57 assertEquals(4, eval('z'));
58 assertEquals(5, eval('u'));
59 assertEquals(6, eval('v'));
73 assertEquals(1, one);
74 assertEquals(2, x);
[all …]
/external/apache-harmony/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/
DCipherSuiteTest.java45 assertEquals("testToString failed", "CipherSuite1: 10 10", in testToString()
52 assertEquals("incorrect cipher suite returned", suites[i], in testGetByName()
66 assertEquals("incorrect cipher suite returned", suites[i], in testGetByCodebytebyte()
69 assertEquals("incorrect cipher suite returned for code: 10 10", in testGetByCodebytebyte()
81 assertEquals("incorrect cipher suite returned", suites[i], in testGetByCodebytebytebyte()
84 assertEquals("incorrect cipher suite returned for code: 10 10 10", in testGetByCodebytebytebyte()
117 assertEquals(suites[i].getName(), names[i]); in testGetSupportedCipherSuiteNames()
128 assertEquals("RC4", in testGetBulkEncryptionAlgorithm()
131 assertEquals("RC4", in testGetBulkEncryptionAlgorithm()
134 assertEquals("RC4", in testGetBulkEncryptionAlgorithm()
[all …]

12345678910>>...133