From ca089b24d48ef6fa8da2d0bb8c25bb802c4a95c0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 13 Jul 2017 19:25:18 +0000 Subject: Vendor import of llvm trunk r307894: https://llvm.org/svn/llvm-project/llvm/trunk@307894 --- unittests/Support/MathExtrasTest.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unittests/Support/MathExtrasTest.cpp') diff --git a/unittests/Support/MathExtrasTest.cpp b/unittests/Support/MathExtrasTest.cpp index e26653b8a6564..694a1f24d0320 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)); -- cgit v1.2.3