Skip to content

Commit 002038f

Browse files
authored
Update HammingCode.test.js
1 parent d3b2f1c commit 002038f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
import { HammingCode } from '../HammingCode'
22

33
test('checks HammingCode of 1110101 hex converted is 5', () => {
4-
const code = HammingCode(parseInt("1110101",16))
4+
let code = HammingCode(parseInt("1110101",16))
55
expect(code).toBe(5)
66
})
77

88
test('checks HammingCode of 10043091 hex converted is 7', () => {
9-
const code = HammingCode(parseInt("10043091",16))
9+
let code = HammingCode(parseInt("10043091",16))
1010
expect(code).toBe(7)
1111
})
1212

1313
test('checks HammingCode of 889193 hex converted is 9', () => {
14-
const code = HammingCode(parseInt("889193",16))
14+
let code = HammingCode(parseInt("889193",16))
1515
expect(code).toBe(9)
1616
})
1717

1818
test('checks HammingCode of 1110101 hex converted is 5', () => {
19-
const code = HammingCode(parseInt("1101110",2))
19+
let code = HammingCode(parseInt("1101110",2))
2020
expect(code).toBe(5)
2121
})
2222

2323
test('checks HammingCode of 1101110 is 5', () => {
24-
const code = HammingCode(1101110)
24+
let code = HammingCode(1101110)
2525
expect(code).toBe(5)
2626
})
2727

2828
test('checks HammingCode of 0x10043091 is 7', () => {
29-
const code = HammingCode(0x10043091)
29+
let code = HammingCode(0x10043091)
3030
expect(code).toBe(7)
3131
})
3232

3333
test('checks HammingCode of 0x8891930311 is NaN (above range)', () => {
34-
const code = HammingCode(0x8891930311)
34+
let code = HammingCode(0x8891930311)
3535
expect(code).toBeNaN()
3636
})
3737

3838
test('checks HammingCode of the Number 100 is 3', () => {
39-
const code = HammingCode((Number(100))
39+
let code = HammingCode((Number(100))
4040
expect(code).toBe(3)
4141
})

0 commit comments

Comments
 (0)