[flang-commits] [PATCH] D107986: [flang] Correct expected unit test results for SET_EXPONENT
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Aug 12 11:25:56 PDT 2021
klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
Four of the expected results are too large by a factor of two.
https://reviews.llvm.org/D107986
Files:
flang/unittests/Runtime/Numeric.cpp
Index: flang/unittests/Runtime/Numeric.cpp
===================================================================
--- flang/unittests/Runtime/Numeric.cpp
+++ flang/unittests/Runtime/Numeric.cpp
@@ -142,10 +142,10 @@
TEST(Numeric, SetExponent) {
EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{0}, 0), 0);
EXPECT_EQ(RTNAME(SetExponent8)(Real<8>{0}, 666), 0);
- EXPECT_EQ(RTNAME(SetExponent8)(Real<8>{3.0}, 0), 1.5);
- EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, 0), 1.0);
- EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, 1), 2.0);
- EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, -1), 0.5);
+ EXPECT_EQ(RTNAME(SetExponent8)(Real<8>{3.0}, 0), 0.75);
+ EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, 0), 0.5);
+ EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, 1), 1.0);
+ EXPECT_EQ(RTNAME(SetExponent4)(Real<4>{1.0}, -1), 0.25);
EXPECT_TRUE(std::isnan(
RTNAME(SetExponent4)(std::numeric_limits<Real<4>>::infinity(), 1)));
EXPECT_TRUE(std::isnan(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107986.366052.patch
Type: text/x-patch
Size: 951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210812/f654c8e6/attachment.bin>
More information about the flang-commits
mailing list