summaryrefslogtreecommitdiff
path: root/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Support/MathExtrasTest.cpp')
-rw-r--r--unittests/Support/MathExtrasTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Support/MathExtrasTest.cpp b/unittests/Support/MathExtrasTest.cpp
index e26653b8a656..694a1f24d032 100644
--- a/unittests/Support/MathExtrasTest.cpp
+++ b/unittests/Support/MathExtrasTest.cpp
@@ -177,6 +177,7 @@ TEST(MathExtras, reverseBits) {
}
TEST(MathExtras, isPowerOf2_32) {
+ EXPECT_FALSE(isPowerOf2_32(0));
EXPECT_TRUE(isPowerOf2_32(1 << 6));
EXPECT_TRUE(isPowerOf2_32(1 << 12));
EXPECT_FALSE(isPowerOf2_32((1 << 19) + 3));
@@ -184,6 +185,7 @@ TEST(MathExtras, isPowerOf2_32) {
}
TEST(MathExtras, isPowerOf2_64) {
+ EXPECT_FALSE(isPowerOf2_64(0));
EXPECT_TRUE(isPowerOf2_64(1LL << 46));
EXPECT_TRUE(isPowerOf2_64(1LL << 12));
EXPECT_FALSE(isPowerOf2_64((1LL << 53) + 3));