diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-20 17:12:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-20 17:12:33 +0000 |
commit | cdd93d8c35e1e983fd3a37f3de2ebc154731f20d (patch) | |
tree | 3731cd7adb2b864168cb84563956fbef197f9423 /unittests | |
parent | 5078f84c82814e4d33846f9ef54281619d362f8a (diff) | |
download | external_llvm-cdd93d8c35e1e983fd3a37f3de2ebc154731f20d.zip external_llvm-cdd93d8c35e1e983fd3a37f3de2ebc154731f20d.tar.gz external_llvm-cdd93d8c35e1e983fd3a37f3de2ebc154731f20d.tar.bz2 |
Fix two APFloat bugs in converting hexadecimal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/APFloatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/ADT/APFloatTest.cpp b/unittests/ADT/APFloatTest.cpp index b97810b..7b947c5 100644 --- a/unittests/ADT/APFloatTest.cpp +++ b/unittests/ADT/APFloatTest.cpp @@ -60,6 +60,8 @@ TEST(APFloatTest, fromString) { EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, "0x0000.00000p1234").convertToDouble()); EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, "0x.00000p1234").convertToDouble()); EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, "0x0.p1234").convertToDouble()); + EXPECT_EQ(1.0625, APFloat(APFloat::IEEEdouble, "0x1.1p0").convertToDouble()); + EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble, "0x1p0").convertToDouble()); EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, StringRef("0e1\02", 3)).convertToDouble()); } |