aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ADT/APFloatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/APFloatTest.cpp')
-rw-r--r--unittests/ADT/APFloatTest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/unittests/ADT/APFloatTest.cpp b/unittests/ADT/APFloatTest.cpp
index 8b82fb2..a4445f6 100644
--- a/unittests/ADT/APFloatTest.cpp
+++ b/unittests/ADT/APFloatTest.cpp
@@ -13,6 +13,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
#include "gtest/gtest.h"
+#include <cmath>
#include <ostream>
#include <string>
@@ -1305,13 +1306,13 @@ TEST(APFloatTest, roundToIntegral) {
EXPECT_EQ(-0.0, P.convertToDouble());
P = APFloat::getNaN(APFloat::IEEEdouble);
P.roundToIntegral(APFloat::rmTowardZero);
- EXPECT_TRUE(IsNAN(P.convertToDouble()));
+ EXPECT_TRUE(std::isnan(P.convertToDouble()));
P = APFloat::getInf(APFloat::IEEEdouble);
P.roundToIntegral(APFloat::rmTowardZero);
- EXPECT_TRUE(IsInf(P.convertToDouble()) && P.convertToDouble() > 0.0);
+ EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() > 0.0);
P = APFloat::getInf(APFloat::IEEEdouble, true);
P.roundToIntegral(APFloat::rmTowardZero);
- EXPECT_TRUE(IsInf(P.convertToDouble()) && P.convertToDouble() < 0.0);
+ EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() < 0.0);
}