mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00
Merge branch 'SetBit'
This commit is contained in:
@ -1,21 +1,21 @@
|
|||||||
import { setBit } from '../SetBit'
|
import { setBit } from '../SetBit'
|
||||||
|
|
||||||
test('should set bit at the given bit Position', () => {
|
test('Set bit number 0 in 1:', () => {
|
||||||
const setBitPos = setBit(1, 0)
|
const setBitPos = setBit(1, 0)
|
||||||
expect(setBitPos).toBe(1)
|
expect(setBitPos).toBe(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should set bit at the given bit Position', () => {
|
test('Set bit number 0 in 1:', () => {
|
||||||
const setBitPos = setBit(1, 0)
|
const setBitPos = setBit(1, 0)
|
||||||
expect(setBitPos).toBe(1)
|
expect(setBitPos).toBe(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should set bit at the given bit Position', () => {
|
test('Set bit number 0 in 1:', () => {
|
||||||
const setBitPos = setBit(10, 1)
|
const setBitPos = setBit(10, 1)
|
||||||
expect(setBitPos).toBe(10)
|
expect(setBitPos).toBe(10)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should set bit at the given bit Position', () => {
|
test('Set bit number 0 in 1:', () => {
|
||||||
const setBitPos = setBit(10, 2)
|
const setBitPos = setBit(10, 2)
|
||||||
expect(setBitPos).toBe(14)
|
expect(setBitPos).toBe(14)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user