Home
last modified time | relevance | path

Searched refs:assert (Results 1 – 25 of 8766) sorted by relevance

12345678910>>...351

/third_party/jerryscript/tests/jerry/es2015/
Dregexp-unicode.js16 assert (result !== null);
17 assert (result[0] === "\u0000");
20 assert (result !== null);
21 assert (result[0] === "\u0000");
24 assert (result !== null);
25 assert (result[0] === "\u0000");
29 assert (false);
31 assert (e instanceof SyntaxError);
35 assert (result !== null);
36 assert (result[0] === "\u0000\u0030");
[all …]
Dsymbol-replace.js19 assert (false);
21 assert (e instanceof TypeError);
30 assert (false);
32 assert (e === "abrupt string");
41 assert (false);
43 assert (e === "abrupt replace");
52 assert (false);
54 assert (e === "abrupt global");
64 assert (false);
66 assert (e === "abrupt lastIndex");
[all …]
/third_party/typescript/src/testRunner/unittests/
Dpaths.ts3 assert.strictEqual(ts.normalizeSlashes("a"), "a");
4 assert.strictEqual(ts.normalizeSlashes("a/b"), "a/b");
5 assert.strictEqual(ts.normalizeSlashes("a\\b"), "a/b");
6 assert.strictEqual(ts.normalizeSlashes("\\\\server\\path"), "//server/path");
9 assert.strictEqual(ts.getRootLength("a"), 0);
10 assert.strictEqual(ts.getRootLength("/"), 1);
11 assert.strictEqual(ts.getRootLength("/path"), 1);
12 assert.strictEqual(ts.getRootLength("c:"), 2);
13 assert.strictEqual(ts.getRootLength("c:d"), 0);
14 assert.strictEqual(ts.getRootLength("c:/"), 3);
[all …]
/third_party/jerryscript/tests/jerry/
Dnumber-prototype-to-string.js17 assert((NaN).toString() === "NaN");
18 assert((-Infinity).toString() === "-Infinity");
19 assert((Infinity).toString() === "Infinity");
20 assert((NaN).toString(6) === "NaN");
21 assert((-Infinity).toString(7) === "-Infinity");
22 assert((Infinity).toString(8) === "Infinity");
23 assert((16).toString(16) === "10");
24 assert((15).toString(16) === "f");
25 assert((12.5).toString(4) === "30.2");
26 assert((0.005).toString(4) === "0.000110132232011013223201101323");
[all …]
Ddate-tostring.js15 assert (new Date (NaN) == "Invalid Date");
16 assert (new Date (Infinity, 1, 1, 0, 0, 0) == "Invalid Date");
17 assert (new Date (2015, Infinity, 1, 0, 0, 0) == "Invalid Date");
18 assert (new Date (2015, 7, 1, 0, Infinity, 0) == "Invalid Date");
19 assert (new Date (NaN, 1, 1, 0, 0, 0) == "Invalid Date");
20 assert (new Date (2015, NaN, 1, 0, 0, 0) == "Invalid Date");
21 assert (new Date (2015, 7, 1, 0, NaN, 0) == "Invalid Date");
22 assert (/Fri Feb 13 2015 \d{2}:\d{2}:\d{2} GMT\+\d{2}\d{2}/.test (new Date ("2015-02-13")));
23 assert (/Wed Jul 08 2015 \d{2}:\d{2}:\d{2} GMT\+\d{2}\d{2}/.test (new Date ("2015-07-08T11:29:05.02…
28 assert (false);
[all …]
Dnumber-prototype-to-fixed.js17 assert((123.56).toFixed() === "124");
18 assert((123.56).toFixed(0) === "124");
19 assert((123.56).toFixed(1) === "123.6");
20 assert((123.56).toFixed(5) === "123.56000");
21 assert((1.23e-10).toFixed(2) === "0.00");
22 assert((1.23e+20).toFixed(2) === "123000000000000000000.00");
23 assert((1.23e+21).toFixed(2) === "1.23e+21");
24 assert((-1.23).toFixed(1) === "-1.2");
25 assert((0.00023).toFixed(0) === "0");
26 assert((0.356).toFixed(2) === "0.36");
[all …]
Ddate-setters.js23 assert (d.setTime(0) == 0);
25 assert (d.setTime(day) == day);
26 assert (d.getDate() == 2);
30 assert (d.setMilliseconds(1) == ms);
31 assert (d.getMilliseconds() == 1);
35 assert (d.setUTCMilliseconds(1) == ms);
36 assert (d.getUTCMilliseconds() == 1);
40 assert (d.setSeconds(1) == sec);
41 assert (d.getSeconds() == 1);
43 assert (d.setSeconds(1, 1) == sec + ms);
[all …]
Ddate-getters.js18 assert (d.getFullYear() == 2015);
19 assert (d.getUTCFullYear() == 2015);
20 assert (d.getMonth() == 6);
21 assert (d.getUTCMonth() == 6);
22 assert (d.getDate() == 9);
23 assert (d.getUTCDate() == 9);
24 assert (d.getDay() == 4);
25 assert (d.getUTCDay() == 4);
26 assert (d.getHours() == 12);
27 assert (d.getUTCHours() == (12 + d.getTimezoneOffset() / 60));
[all …]
Ddate-parse.js78 assert (isNaN(d));
84 assert (isNaN(d));
87 assert (isNaN(d));
90 assert (d == 1420070400000);
93 assert (d == 1420070400000);
96 assert (d == 1420070400000);
99 assert (d == 1420070400000);
102 assert (d == 1420070400000);
105 assert (d == 1420070400000);
108 assert (d == 1420070400000);
[all …]
Dglobal-parsefloat.js15 assert(parseFloat("1") === 1);
16 assert(parseFloat("+1") === 1);
17 assert(parseFloat("-1") === -1);
18 assert(parseFloat("1.2") === 1.2);
19 assert(parseFloat("+1.2") === 1.2);
20 assert(parseFloat("-1.2") === -1.2);
21 assert(parseFloat("1.2e3") === 1200);
22 assert(parseFloat("+1.2e3") === 1200);
23 assert(parseFloat("-1.2e3") === -1200);
24 assert(parseFloat(" \n\t 1.2e3") === 1200);
[all …]
Derror.js19 assert (e.name === "Error");
20 assert (e.message === "");
21 assert (e.toString() === "Error");
24 assert (e.name === "Error");
25 assert (e.message === "some message");
26 assert (e.toString() === "Error: some message");
29 assert (e.toString() === "some message");
31 assert (e.toString() === "");
33 assert (Error.prototype.toString !== Object.prototype.toString);
34 assert (Error.prototype.constructor === Error);
[all …]
Dregexp-backtrack.js15 assert (JSON.stringify (/(?:(a)*){3,}/.exec("aaaab")) === '["aaaa",null]');
16 assert (JSON.stringify (/((a)*){3,}/.exec("aaaab")) === '["aaaa","",null]');
17 assert (JSON.stringify (/((a)+){3,}/.exec("aaaab")) === '["aaaa","a","a"]');
18 assert (JSON.stringify (/((.)*){3,}/.exec("abcd")) === '["abcd","",null]');
19 assert (JSON.stringify (/((.)+){3,}/.exec("abcd")) === '["abcd","d","d"]');
21 assert (JSON.stringify (/((.){1,2}){1,2}/.exec("abc")) === '["abc","c","c"]');
22 assert (JSON.stringify (/(?:(a)*?)asd/.exec("aaasd")) === '["aaasd","a"]');
23 assert (JSON.stringify (/(?:(a)*)asd/.exec("aaasd")) === '["aaasd","a"]');
25 assert (JSON.stringify (/(.)*((a)*|(b)*)/.exec("ab")) === '["ab","b","",null,null]');
26 assert (JSON.stringify (/(.)*((x)|(y))+/.exec("xy")) === '["xy","x","y",null,"y"]');
[all …]
Darray-prototype-splice.js25 assert (array.length == 4);
26 assert (array[0] == 54);
27 assert (array[1] == undefined);
28 assert (array[2] == -127);
29 assert (array[3] == "sunshine");
30 assert (array1.length == 0);
36 assert (array.length == 2);
37 assert (array[0] == 54);
38 assert (array[1] == undefined);
39 assert (array2.length == 2);
[all …]
Dregexp-capture-groups.js19 assert (r.exec ("a") == ",");
22 assert (r.exec ("a") == "a,a");
25 assert (r.exec ("abc") == "abc,ab,a");
28 assert (r.exec ("b")[0] == "");
29 assert (r.exec ("b")[1] == undefined);
30 assert (r.exec ("aaaa") == "aaaa,a");
33 assert (r.exec ("aaaa") == "aaaa,a");
36 assert (r.exec ("aaaa") == "aaaa,a");
39 assert (r.exec ("a") == "a,a");
40 assert (r.exec ("aa") == "aa,a");
[all …]
Dregexp-construct.js18 assert (r.source == "(?:)");
19 assert (r.global == false);
20 assert (r.ignoreCase == false);
21 assert (r.multiline == false);
24 assert (r.source == "a");
25 assert (r.global == false);
26 assert (r.ignoreCase == false);
27 assert (r.multiline == false);
30 assert (r.source == "a");
31 assert (r.global == true);
[all …]
Dstring-upper-lower-case-conversion.js17 assert ("\ufb00".toLowerCase() == "\ufb00");
18 assert ("\ufb00".toUpperCase() == "\u0046\u0046");
20 assert ("\ufb01".toLowerCase() == "\ufb01");
21 assert ("\ufb01".toUpperCase() == "\u0046\u0049");
23 assert ("\ufb02".toLowerCase() == "\ufb02");
24 assert ("\ufb02".toUpperCase() == "\u0046\u004c");
26 assert ("\ufb03".toLowerCase() == "\ufb03");
27 assert ("\ufb03".toUpperCase() == "\u0046\u0046\u0049");
29 assert ("\ufb04".toLowerCase() == "\ufb04");
30 assert ("\ufb04".toUpperCase() == "\u0046\u0046\u004c");
[all …]
/third_party/libxkbcommon/test/
Dkeysym.c84 assert(expected != NULL); in test_utf8()
97 assert(test_string("i", XKB_KEY_i)); in test_github_issue_42()
98 assert(test_string("I", XKB_KEY_I)); in test_github_issue_42()
99 assert(test_casestring("i", XKB_KEY_i)); in test_github_issue_42()
100 assert(test_casestring("I", XKB_KEY_i)); in test_github_issue_42()
101 assert(xkb_keysym_to_upper(XKB_KEY_i) == XKB_KEY_I); in test_github_issue_42()
102 assert(xkb_keysym_to_lower(XKB_KEY_I) == XKB_KEY_i); in test_github_issue_42()
133 assert(test_string("Undo", 0xFF65)); in main()
134 assert(test_string("ThisKeyShouldNotExist", XKB_KEY_NoSymbol)); in main()
135 assert(test_string("XF86_Switch_VT_5", 0x1008FE05)); in main()
[all …]
/third_party/quickjs/tests/
Dtest_builtin.js3 function assert(actual, expected, message) { function
62 assert(r, 3, "call");
65 assert(r, 3, "apply");
68 assert(r, 1);
75 assert(r(2,3), 5, "function");
78 assert(g.length, 1);
79 assert(g.name, "bound f");
80 assert(g(3), [1,2,3]);
84 assert(r.x, 1);
92 assert(r.message, "hello", "Error");
[all …]
Dtest_op.js1 function assert(actual, expected, message) { function
27 assert(r, 3, "1 + 2 === 3");
30 assert(r, -1, "1 - 2 === -1");
33 assert(r, -1, "-1 === -1");
36 assert(r, 2, "+2 === 2");
39 assert(r, 6, "2 * 3 === 6");
42 assert(r, 2, "4 / 2 === 2");
45 assert(r, 1, "4 % 3 === 3");
48 assert(r, 16, "4 << 2 === 16");
51 assert(r, 1, "1 << 0 === 1");
[all …]
Dtest_language.js1 function assert(actual, expected, message) { function
43 assert(r, 3, "1 + 2 === 3");
46 assert(r, -1, "1 - 2 === -1");
49 assert(r, -1, "-1 === -1");
52 assert(r, 2, "+2 === 2");
55 assert(r, 6, "2 * 3 === 6");
58 assert(r, 2, "4 / 2 === 2");
61 assert(r, 1, "4 % 3 === 3");
64 assert(r, 16, "4 << 2 === 16");
67 assert(r, 1, "1 << 0 === 1");
[all …]
/third_party/node/test/parallel/
Dtest-assert.js26 const assert = require('assert'); constant
30 const a = assert;
42 assert.ok(a.AssertionError.prototype instanceof Error,
45 assert.throws(() => a(false), a.AssertionError, 'ok(false)');
46 assert.throws(() => a.ok(false), a.AssertionError, 'ok(false)');
52 assert.ok(false, new Error('ok(false)'));
55 assert.ok(e instanceof Error);
57 assert.ok(threw, 'Error: ok(false)');
66 assert.throws(() => a.equal(true, false),
76 assert.throws(() => a.notEqual(true, true),
[all …]
Dtest-util-format.js24 const assert = require('assert'); constant
28 assert.strictEqual(util.format(), '');
29 assert.strictEqual(util.format(''), '');
30 assert.strictEqual(util.format([]), '[]');
31 assert.strictEqual(util.format([0]), '[ 0 ]');
32 assert.strictEqual(util.format({}), '{}');
33 assert.strictEqual(util.format({ foo: 42 }), '{ foo: 42 }');
34 assert.strictEqual(util.format(null), 'null');
35 assert.strictEqual(util.format(true), 'true');
36 assert.strictEqual(util.format(false), 'false');
[all …]
Dtest-util.js25 const assert = require('assert'); constant
31 assert.strictEqual(util.isArray([]), true);
32 assert.strictEqual(util.isArray(Array()), true);
33 assert.strictEqual(util.isArray(new Array()), true);
34 assert.strictEqual(util.isArray(new Array(5)), true);
35 assert.strictEqual(util.isArray(new Array('with', 'some', 'entries')), true);
36 assert.strictEqual(util.isArray(context('Array')()), true);
37 assert.strictEqual(util.isArray({}), false);
38 assert.strictEqual(util.isArray({ push: function() {} }), false);
39 assert.strictEqual(util.isArray(/regexp/), false);
[all …]
Dtest-buffer-indexof.js3 const assert = require('assert'); constant
14 assert.strictEqual(b.indexOf('a'), 0);
15 assert.strictEqual(b.indexOf('a', 1), -1);
16 assert.strictEqual(b.indexOf('a', -1), -1);
17 assert.strictEqual(b.indexOf('a', -4), -1);
18 assert.strictEqual(b.indexOf('a', -b.length), 0);
19 assert.strictEqual(b.indexOf('a', NaN), 0);
20 assert.strictEqual(b.indexOf('a', -Infinity), 0);
21 assert.strictEqual(b.indexOf('a', Infinity), -1);
22 assert.strictEqual(b.indexOf('bc'), 1);
[all …]
/third_party/node/test/js-native-api/test_conversions/
Dtest.js3 const assert = require('assert'); constant
12 assert.strictEqual(test.asBool(false), false);
13 assert.strictEqual(test.asBool(true), true);
14 assert.throws(() => test.asBool(undefined), boolExpected);
15 assert.throws(() => test.asBool(null), boolExpected);
16 assert.throws(() => test.asBool(Number.NaN), boolExpected);
17 assert.throws(() => test.asBool(0), boolExpected);
18 assert.throws(() => test.asBool(''), boolExpected);
19 assert.throws(() => test.asBool('0'), boolExpected);
20 assert.throws(() => test.asBool(1), boolExpected);
[all …]

12345678910>>...351