mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[ADT/MathExtras] Add tests for PowerOf2Floor (previously untested).
llvm-svn: 286551
This commit is contained in:
parent
d0483ae084
commit
99d50aaa8a
@ -171,6 +171,12 @@ TEST(MathExtras, PowerOf2Ceil) {
|
||||
EXPECT_EQ(8, PowerOf2Ceil(7));
|
||||
}
|
||||
|
||||
TEST(MathExtras, PowerOf2Floor) {
|
||||
EXPECT_EQ(0, PowerOf2Floor(0));
|
||||
EXPECT_EQ(8, PowerOf2Floor(8));
|
||||
EXPECT_EQ(4, PowerOf2Floor(7));
|
||||
}
|
||||
|
||||
TEST(MathExtras, ByteSwap_32) {
|
||||
EXPECT_EQ(0x44332211u, ByteSwap_32(0x11223344));
|
||||
EXPECT_EQ(0xDDCCBBAAu, ByteSwap_32(0xAABBCCDD));
|
||||
|
Loading…
Reference in New Issue
Block a user