public void SetBitsFromToRight_53_12() { // 1111 1111 1111//0000 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 ulong result = 0xFFF0000000000000; Assert.Equal(result, BinaryOperations.SetBitsFromToRight(53, 12)); }
public void SetBitsFromToRight_1_7() { // 0000 0000 0000//0000 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0111.1111 ulong result = 0x000000000000007F; Assert.Equal(result, BinaryOperations.SetBitsFromToRight(1, 7)); }
public void SetBitsFromToRight_8_1() { ulong result = 0x80; Assert.Equal(result, BinaryOperations.SetBitsFromToRight(8, 1)); }
public void SetBitsFromToRight_1_8() { ulong result = 0xFF; Assert.Equal(result, BinaryOperations.SetBitsFromToRight(1, 8)); }