mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: delete duplicate test of noAssert in readUInt*
PR-URL: https://github.com/nodejs/node/pull/10791 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
1 parent
6af10907a2
commit
425563b59e
2 files changed
-48
No files matched your search
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
// testing basic functionality of readUIntBE()
|
||||
|
||||
const buf = Buffer.from([42, 84, 168, 127]);
|
||||
const result = buf.readUIntBE(2);
|
||||
|
||||
assert.strictEqual(result, 84);
|
||||
|
||||
assert.throws(
|
||||
() => {
|
||||
buf.readUIntBE(5);
|
||||
},
|
||||
/Index out of range/
|
||||
);
|
||||
|
||||
assert.doesNotThrow(
|
||||
() => {
|
||||
buf.readUIntBE(5, 0, true);
|
||||
},
|
||||
'readUIntBE() should not throw if noAssert is true'
|
||||
);
|
||||
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
// testing basic functionality of readUIntLE()
|
||||
|
||||
const buf = Buffer.from([42, 84, 168, 127]);
|
||||
const result = buf.readUIntLE(2);
|
||||
|
||||
assert.strictEqual(result, 168);
|
||||
|
||||
assert.throws(
|
||||
() => {
|
||||
buf.readUIntLE(5);
|
||||
},
|
||||
/Index out of range/
|
||||
);
|
||||
|
||||
assert.doesNotThrow(
|
||||
() => {
|
||||
buf.readUIntLE(5, 0, true);
|
||||
},
|
||||
'readUIntLE() should not throw if noAssert is true'
|
||||
);
|
||||
Reference in new issue
Block a user