/third_party/node/test/parallel/ |
D | test-util-format.js | 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'); 37 assert.strictEqual(util.format('test'), 'test'); [all …]
|
D | test-buffer-indexof.js | 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); 23 assert.strictEqual(b.indexOf('bc', 2), -1); [all …]
|
D | test-util.js | 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); 40 assert.strictEqual(util.isArray(new Error()), false); [all …]
|
D | test-net-isip.js | 27 assert.strictEqual(net.isIP('127.0.0.1'), 4); 28 assert.strictEqual(net.isIP('x127.0.0.1'), 0); 29 assert.strictEqual(net.isIP('example.com'), 0); 30 assert.strictEqual(net.isIP('0000:0000:0000:0000:0000:0000:0000:0000'), 6); 31 assert.strictEqual(net.isIP('0000:0000:0000:0000:0000:0000:0000:0000::0000'), 33 assert.strictEqual(net.isIP('1050:0:0:0:5:600:300c:326b'), 6); 34 assert.strictEqual(net.isIP('2001:252:0:1::2008:6'), 6); 35 assert.strictEqual(net.isIP('2001:dead:beef:1::2008:6'), 6); 36 assert.strictEqual(net.isIP('2001::'), 6); 37 assert.strictEqual(net.isIP('2001:dead::'), 6); [all …]
|
D | test-buffer-alloc.js | 16 assert.strictEqual(b.length, 1024); 19 assert.strictEqual(b[0], 255); 26 assert.strictEqual(i % 256, b[i]); 30 assert.strictEqual(c.length, 512); 33 assert.strictEqual(d.length, 0); 38 assert.strictEqual(b.length, 128); 39 assert.strictEqual(b.byteOffset, 0); 40 assert.strictEqual(b.offset, 0); 48 assert.strictEqual(value, ui32[index]); 121 assert.strictEqual(writeTest.toString(), 'nodejs'); [all …]
|
D | test-buffer-tostring-range.js | 9 assert.strictEqual(rangeBuffer.toString('ascii', 3), ''); 10 assert.strictEqual(rangeBuffer.toString('ascii', +Infinity), ''); 11 assert.strictEqual(rangeBuffer.toString('ascii', 3.14, 3), ''); 12 assert.strictEqual(rangeBuffer.toString('ascii', 'Infinity', 3), ''); 15 assert.strictEqual(rangeBuffer.toString('ascii', 1, 0), ''); 16 assert.strictEqual(rangeBuffer.toString('ascii', 1, -1.2), ''); 17 assert.strictEqual(rangeBuffer.toString('ascii', 1, -100), ''); 18 assert.strictEqual(rangeBuffer.toString('ascii', 1, -Infinity), ''); 21 assert.strictEqual(rangeBuffer.toString('ascii', -1, 3), 'abc'); 22 assert.strictEqual(rangeBuffer.toString('ascii', -1.99, 3), 'abc'); [all …]
|
D | test-path-basename.js | 6 assert.strictEqual(path.basename(__filename), 'test-path-basename.js'); 7 assert.strictEqual(path.basename(__filename, '.js'), 'test-path-basename'); 8 assert.strictEqual(path.basename('.js', '.js'), ''); 9 assert.strictEqual(path.basename(''), ''); 10 assert.strictEqual(path.basename('/dir/basename.ext'), 'basename.ext'); 11 assert.strictEqual(path.basename('/basename.ext'), 'basename.ext'); 12 assert.strictEqual(path.basename('basename.ext'), 'basename.ext'); 13 assert.strictEqual(path.basename('basename.ext/'), 'basename.ext'); 14 assert.strictEqual(path.basename('basename.ext//'), 'basename.ext'); 15 assert.strictEqual(path.basename('aaa/bbb', '/bbb'), 'bbb'); [all …]
|
D | test-fs-error-messages.js | 72 assert.strictEqual(nonexistentFile, err.path); 73 assert.strictEqual( 76 assert.strictEqual(err.errno, UV_ENOENT); 77 assert.strictEqual(err.code, 'ENOENT'); 78 assert.strictEqual(err.syscall, 'stat'); 93 assert.strictEqual(nonexistentFile, err.path); 94 assert.strictEqual( 97 assert.strictEqual(err.errno, UV_ENOENT); 98 assert.strictEqual(err.code, 'ENOENT'); 99 assert.strictEqual(err.syscall, 'lstat'); [all …]
|
D | test-whatwg-url-custom-properties.js | 30 assert.strictEqual(url.toString(), url.href); 32 assert.strictEqual(url.href, 34 assert.strictEqual(url.toString(), url.href); 37 assert.strictEqual((delete url.href), true); 38 assert.strictEqual(url.href, 40 assert.strictEqual(url.searchParams, oldParams); // [SameObject] 49 assert.strictEqual(url.origin, 'http://foo.bar.com:21'); 50 assert.strictEqual(url.toString(), 52 assert.strictEqual((delete url.origin), true); 53 assert.strictEqual(url.origin, 'http://foo.bar.com:21'); [all …]
|
D | test-util-inspect.js | 34 assert.strictEqual(util.inspect(1), '1'); 35 assert.strictEqual(util.inspect(false), 'false'); 36 assert.strictEqual(util.inspect(''), "''"); 37 assert.strictEqual(util.inspect('hello'), "'hello'"); 38 assert.strictEqual(util.inspect(function abc() {}), '[Function: abc]'); 39 assert.strictEqual(util.inspect(() => {}), '[Function (anonymous)]'); 40 assert.strictEqual( 44 assert.strictEqual(util.inspect(async () => {}), '[AsyncFunction (anonymous)]'); 49 assert.strictEqual( 53 assert.strictEqual( [all …]
|
D | test-path-dirname.js | 6 assert.strictEqual(path.dirname(__filename).substr(-13), 9 assert.strictEqual(path.posix.dirname('/a/b/'), '/a'); 10 assert.strictEqual(path.posix.dirname('/a/b'), '/a'); 11 assert.strictEqual(path.posix.dirname('/a'), '/'); 12 assert.strictEqual(path.posix.dirname(''), '.'); 13 assert.strictEqual(path.posix.dirname('/'), '/'); 14 assert.strictEqual(path.posix.dirname('////'), '/'); 15 assert.strictEqual(path.posix.dirname('//a'), '//'); 16 assert.strictEqual(path.posix.dirname('foo'), '.'); 18 assert.strictEqual(path.win32.dirname('c:\\'), 'c:\\'); [all …]
|
D | test-path-normalize.js | 6 assert.strictEqual(path.win32.normalize('./fixtures///b/../b/c.js'), 8 assert.strictEqual(path.win32.normalize('/foo/../../../bar'), '\\bar'); 9 assert.strictEqual(path.win32.normalize('a//b//../b'), 'a\\b'); 10 assert.strictEqual(path.win32.normalize('a//b//./c'), 'a\\b\\c'); 11 assert.strictEqual(path.win32.normalize('a//b//.'), 'a\\b'); 12 assert.strictEqual(path.win32.normalize('//server/share/dir/file.ext'), 14 assert.strictEqual(path.win32.normalize('/a/b/c/../../../x/y/z'), '\\x\\y\\z'); 15 assert.strictEqual(path.win32.normalize('C:'), 'C:.'); 16 assert.strictEqual(path.win32.normalize('C:..\\abc'), 'C:..\\abc'); 17 assert.strictEqual(path.win32.normalize('C:..\\..\\abc\\..\\def'), [all …]
|
D | test-buffer-bytelength.js | 26 assert.strictEqual(Buffer.byteLength('', undefined, true), -1); 37 assert.strictEqual(Buffer.byteLength(incomplete), 5); 39 assert.strictEqual(Buffer.byteLength(ascii), 3); 43 assert.strictEqual(Buffer.byteLength(buffer), 8); 47 assert.strictEqual(Buffer.byteLength(int8), 8); 49 assert.strictEqual(Buffer.byteLength(uint8), 8); 51 assert.strictEqual(Buffer.byteLength(uintc8), 2); 53 assert.strictEqual(Buffer.byteLength(int16), 16); 55 assert.strictEqual(Buffer.byteLength(uint16), 16); 57 assert.strictEqual(Buffer.byteLength(int32), 32); [all …]
|
D | test-readline-csi.js | 12 assert.strictEqual(CSI.kClearToLineBeginning, '\x1b[1K'); 13 assert.strictEqual(CSI.kClearToLineEnd, '\x1b[0K'); 14 assert.strictEqual(CSI.kClearLine, '\x1b[2K'); 15 assert.strictEqual(CSI.kClearScreenDown, '\x1b[0J'); 16 assert.strictEqual(CSI`1${2}3`, '\x1b[123'); 32 assert.strictEqual(readline.clearScreenDown(writable), true); 34 assert.strictEqual(readline.clearScreenDown(writable, common.mustCall()), true); 42 assert.strictEqual(readline.clearScreenDown(null, common.mustCall((err) => { 43 assert.strictEqual(err, null); 45 assert.strictEqual(readline.clearScreenDown(undefined, common.mustCall()), [all …]
|
D | test-icu-stringwidth.js | 11 assert.strictEqual(getStringWidth('a'), 1); 12 assert.strictEqual(getStringWidth(String.fromCharCode(0x0061)), 1); 14 assert.strictEqual(getStringWidth('丁'), 2); 15 assert.strictEqual(getStringWidth(String.fromCharCode(0x4E01)), 2); 17 assert.strictEqual(getStringWidth('\ud83d\udc78\ud83c\udfff'), 4); 18 assert.strictEqual(getStringWidth(''), 2); 20 assert.strictEqual(getStringWidth('\ud83d'), 1); 22 assert.strictEqual(getStringWidth('\udc78'), 1); 24 assert.strictEqual(getStringWidth('\u0000'), 0); 26 assert.strictEqual(getStringWidth(String.fromCharCode(0x0007)), 0); [all …]
|
D | test-nodeeventtarget.js | 13 strictEqual, 21 strictEqual(eventTarget.listenerCount('foo'), 0); 25 strictEqual(event.type, 'foo'); 26 strictEqual(this, eventTarget); 31 strictEqual(event.type, 'foo'); 32 strictEqual(this, ev2); 38 strictEqual(eventTarget.listenerCount('foo'), 2); 40 strictEqual(eventTarget.listenerCount('foo'), 1); 44 strictEqual(eventTarget.listenerCount('foo'), 0); 50 strictEqual(eventTarget.listenerCount('foo'), 0); [all …]
|
D | test-buffer-readint.js | 51 assert.strictEqual(data.readInt8(0), 0x23); 54 assert.strictEqual(data.readInt8(0), -1); 57 assert.strictEqual(data.readInt8(0), -121); 58 assert.strictEqual(data.readInt8(1), -85); 59 assert.strictEqual(data.readInt8(2), 124); 60 assert.strictEqual(data.readInt8(3), -17); 67 assert.strictEqual(buffer.readInt16BE(0), 0x1679); 68 assert.strictEqual(buffer.readInt16LE(0), 0x7916); 72 assert.strictEqual(buffer.readInt16BE(0), -128); 73 assert.strictEqual(buffer.readInt16LE(0), -32513); [all …]
|
D | test-repl-options.js | 31 assert.strictEqual(repl.repl, undefined); 54 assert.strictEqual(r1.input, stream); 55 assert.strictEqual(r1.output, stream); 56 assert.strictEqual(r1.input, r1.inputStream); 57 assert.strictEqual(r1.output, r1.outputStream); 58 assert.strictEqual(r1.terminal, true); 59 assert.strictEqual(r1.useColors, r1.terminal); 60 assert.strictEqual(r1.useGlobal, false); 61 assert.strictEqual(r1.ignoreUndefined, false); 62 assert.strictEqual(r1.replMode, repl.REPL_MODE_SLOPPY); [all …]
|
D | test-http2-session-stream-state.js | 18 assert.strictEqual(typeof state, 'object'); 19 assert.strictEqual(typeof state.state, 'number'); 20 assert.strictEqual(typeof state.weight, 'number'); 21 assert.strictEqual(typeof state.sumDependencyWeight, 'number'); 22 assert.strictEqual(typeof state.localClose, 'number'); 23 assert.strictEqual(typeof state.remoteClose, 'number'); 24 assert.strictEqual(typeof state.localWindowSize, 'number'); 30 assert.strictEqual(typeof state, 'object'); 31 assert.strictEqual(typeof state.effectiveLocalWindowSize, 'number'); 32 assert.strictEqual(typeof state.effectiveRecvDataLength, 'number'); [all …]
|
D | test-path-makelong.js | 32 assert.strictEqual(path.toNamespacedPath(file), 34 assert.strictEqual(path.toNamespacedPath(`\\\\?\\${file}`), 36 assert.strictEqual(path.toNamespacedPath( 39 assert.strictEqual(path.toNamespacedPath( 42 assert.strictEqual(path.toNamespacedPath('\\\\.\\pipe\\somepipe'), 46 assert.strictEqual(path.toNamespacedPath(''), ''); 47 assert.strictEqual(path.toNamespacedPath(null), null); 48 assert.strictEqual(path.toNamespacedPath(100), 100); 49 assert.strictEqual(path.toNamespacedPath(path), path); 50 assert.strictEqual(path.toNamespacedPath(false), false); [all …]
|
D | test-blob.js | 11 assert.strictEqual(b.size, 0); 12 assert.strictEqual(b.type, ''); 30 assert.strictEqual(b.size, 0); 31 assert.strictEqual(b.type, ''); 37 assert.strictEqual(text, ''); 40 assert.strictEqual(c.size, 0); 44 assert.strictEqual(new Blob([], { type: 1 }).type, '1'); 45 assert.strictEqual(new Blob([], { type: false }).type, 'false'); 46 assert.strictEqual(new Blob([], { type: {} }).type, '[object object]'); 51 assert.strictEqual(b.size, 3); [all …]
|
D | test-socketaddress.js | 6 strictEqual, 18 strictEqual(sa.address, '127.0.0.1'); 19 strictEqual(sa.port, 0); 20 strictEqual(sa.family, 'ipv4'); 21 strictEqual(sa.flowlabel, 0); 27 strictEqual(data.address, '127.0.0.1'); 28 strictEqual(data.port, 0); 29 strictEqual(data.family, 'ipv4'); 30 strictEqual(data.flowlabel, 0); 39 strictEqual(sa.address, '127.0.0.1'); [all …]
|
/third_party/typescript/src/testRunner/unittests/ |
D | paths.ts | 3 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/node/test/js-native-api/test_string/ |
D | test.js | 9 assert.strictEqual(test_string.TestLatin1(empty), empty); 10 assert.strictEqual(test_string.TestUtf8(empty), empty); 11 assert.strictEqual(test_string.TestUtf16(empty), empty); 12 assert.strictEqual(test_string.Utf16Length(empty), 0); 13 assert.strictEqual(test_string.Utf8Length(empty), 0); 16 assert.strictEqual(test_string.TestLatin1(str1), str1); 17 assert.strictEqual(test_string.TestUtf8(str1), str1); 18 assert.strictEqual(test_string.TestUtf16(str1), str1); 19 assert.strictEqual(test_string.TestLatin1Insufficient(str1), str1.slice(0, 3)); 20 assert.strictEqual(test_string.TestUtf8Insufficient(str1), str1.slice(0, 3)); [all …]
|
/third_party/node/test/js-native-api/test_conversions/ |
D | test.js | 12 assert.strictEqual(test.asBool(false), false); 13 assert.strictEqual(test.asBool(true), true); 28 assert.strictEqual(asInt(0), 0); 29 assert.strictEqual(asInt(1), 1); 30 assert.strictEqual(asInt(1.0), 1); 31 assert.strictEqual(asInt(1.1), 1); 32 assert.strictEqual(asInt(1.9), 1); 33 assert.strictEqual(asInt(0.9), 0); 34 assert.strictEqual(asInt(999.9), 999); 35 assert.strictEqual(asInt(Number.NaN), 0); [all …]
|