Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
29
node_modules/binary/test/posls.js
generated
vendored
Normal file
29
node_modules/binary/test/posls.js
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
var binary = require('../');
|
||||
var test = require('tap').test;
|
||||
|
||||
test('posls', function (t) {
|
||||
t.plan(4);
|
||||
|
||||
// note: can't store 12667700813876161 exactly in an ieee float
|
||||
var buf = new Buffer([
|
||||
30, // a == -30
|
||||
37, 9, // b == -2341
|
||||
20, 10, 12, 0, // c == -789012
|
||||
193, 203, 33, 239, 52, 1, 45, 0, // d == 12667700813876161
|
||||
]);
|
||||
|
||||
binary.parse(buf)
|
||||
.word8ls('a')
|
||||
.word16ls('b')
|
||||
.word32ls('c')
|
||||
.word64ls('d')
|
||||
.tap(function (vars) {
|
||||
t.same(vars.a, 30);
|
||||
t.same(vars.b, 2341);
|
||||
t.same(vars.c, 789012);
|
||||
t.ok(
|
||||
Math.abs(vars.d - 12667700813876161) < 1000
|
||||
);
|
||||
})
|
||||
;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue