public void Test_RotateLeft_Int64() { assertEquals(0xF, BitOperation.RotateLeft(0xFL, 0)); assertEquals(0xF0, BitOperation.RotateLeft(0xFL, 4)); assertEquals(0xF00, BitOperation.RotateLeft(0xFL, 8)); assertEquals(0xF000, BitOperation.RotateLeft(0xFL, 12)); assertEquals(0xF0000, BitOperation.RotateLeft(0xFL, 16)); assertEquals(0xF00000, BitOperation.RotateLeft(0xFL, 20)); assertEquals(0xF000000, BitOperation.RotateLeft(0xFL, 24)); assertEquals(0xF0000000L, BitOperation.RotateLeft(0xFL, 28)); unchecked { assertEquals((long)0xF000000000000000L, BitOperation.RotateLeft((long)0xF000000000000000L, 64)); } }
public void Test_RotateLeft_Int32() { assertEquals(0xF, BitOperation.RotateLeft(0xF, 0)); assertEquals(0xF0, BitOperation.RotateLeft(0xF, 4)); assertEquals(0xF00, BitOperation.RotateLeft(0xF, 8)); assertEquals(0xF000, BitOperation.RotateLeft(0xF, 12)); assertEquals(0xF0000, BitOperation.RotateLeft(0xF, 16)); assertEquals(0xF00000, BitOperation.RotateLeft(0xF, 20)); assertEquals(0xF000000, BitOperation.RotateLeft(0xF, 24)); unchecked { assertEquals((int)0xF0000000, BitOperation.RotateLeft(0xF, 28)); assertEquals((int)0xF0000000, BitOperation.RotateLeft((int)0xF0000000, 32)); } }