bitwise: remove tests that perform a full rotate
Full rotation is undefined on x86 so it's caught be assertions now.
This commit is contained in:
parent
46c2153434
commit
95c5fc5b1d
@ -10,24 +10,20 @@ test_rotate (cruft::TAP::logger &tap)
|
||||
tap.expect_eq (cruft::rotatel (uint8_t (0x0F), 0), 0x0Fu, "rotate-left u8");
|
||||
tap.expect_eq (cruft::rotatel (uint8_t (0x0F), 4), 0xF0u, "rotate-left u8");
|
||||
tap.expect_eq (cruft::rotatel (uint8_t (0xF0), 4), 0x0Fu, "rotate-left u8");
|
||||
tap.expect_eq (cruft::rotatel (uint8_t (0x0F), 8), 0x0Fu, "rotate-left u8");
|
||||
|
||||
tap.expect_eq (cruft::rotater (uint8_t (0x0F), 0), 0x0Fu, "rotate-right u8");
|
||||
tap.expect_eq (cruft::rotater (uint8_t (0x0F), 4), 0xF0u, "rotate-right u8");
|
||||
tap.expect_eq (cruft::rotater (uint8_t (0xF0), 4), 0x0Fu, "rotate-right u8");
|
||||
tap.expect_eq (cruft::rotater (uint8_t (0x0F), 8), 0x0Fu, "rotate-right u8");
|
||||
|
||||
tap.expect_eq (cruft::rotatel (uint16_t (0xABCD), 0), 0xABCDu, "rotate-left u16");
|
||||
tap.expect_eq (cruft::rotatel (uint16_t (0xABCD), 4), 0xBCDAu, "rotate-left u16");
|
||||
tap.expect_eq (cruft::rotatel (uint16_t (0xABCD), 8), 0xCDABu, "rotate-left u16");
|
||||
tap.expect_eq (cruft::rotatel (uint16_t (0xABCD), 12), 0xDABCu, "rotate-left u16");
|
||||
tap.expect_eq (cruft::rotatel (uint16_t (0xABCD), 16), 0xABCDu, "rotate-left u16");
|
||||
|
||||
tap.expect_eq (cruft::rotater (uint16_t (0xABCD), 0), 0xABCDu, "rotate-right u16");
|
||||
tap.expect_eq (cruft::rotater (uint16_t (0xABCD), 4), 0xDABCu, "rotate-right u16");
|
||||
tap.expect_eq (cruft::rotater (uint16_t (0xABCD), 8), 0xCDABu, "rotate-right u16");
|
||||
tap.expect_eq (cruft::rotater (uint16_t (0xABCD), 12), 0xBCDAu, "rotate-right u16");
|
||||
tap.expect_eq (cruft::rotater (uint16_t (0xABCD), 16), 0xABCDu, "rotate-right u16");
|
||||
|
||||
tap.expect_eq (cruft::rotatel (uint32_t (0x12345670), 12), 0x45670123u, "rotate-left u32");
|
||||
tap.expect_eq (cruft::rotater (uint32_t (0x12345670), 12), 0x67012345u, "rotate-right u32");
|
||||
|
Loading…
Reference in New Issue
Block a user