Skip to content

Commit 03375f5

Browse files
author
Alexander Belov
committed
Fixes
1 parent 800bb5b commit 03375f5

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/lib/math/nearest-highest-power-of-two/nearest-highest-power-of-two.spec.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ import { nearestHighestPowerOfTwo } from './nearest-highest-power-of-two';
44

55
test('nearest highest power of two', t => {
66
const tests = [
7-
[ 1, 0 ],
8-
[ 2, 1 ],
9-
[ 3, 2 ],
10-
[ 5, 3 ],
11-
[ 11, 4 ],
12-
[ 1023, 10 ],
13-
[ 1024, 10 ],
14-
[ 1025, 11 ],
15-
[ 2 ** 31 - 1, 31 ],
16-
[ 2 ** 78 - 1, 78 ],
17-
[ 2 ** 78 + 1, 79 ],
7+
[1, 0],
8+
[2, 1],
9+
[3, 2],
10+
[5, 3],
11+
[11, 4],
12+
[1023, 10],
13+
[1024, 10],
14+
[1025, 11],
15+
[2 ** 31 - 1, 31],
16+
[2 ** 78 - 1, 78]
1817
];
1918

2019
for (const v of tests) {
21-
const [ value, power ] = v;
20+
const [value, power] = v;
2221

2322
t.is(nearestHighestPowerOfTwo(value), power);
2423
}

0 commit comments

Comments
 (0)