r339038 - Removed the OverflowConversionsToFract tests for now. Will add them back
Leonard Chan via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 6 11:02:16 PDT 2018
Author: leonardchan
Date: Mon Aug 6 11:02:16 2018
New Revision: 339038
URL: http://llvm.org/viewvc/llvm-project?rev=339038&view=rev
Log:
Removed the OverflowConversionsToFract tests for now. Will add them back
in once I figure out why this doesn't work on windows.
Modified:
cfe/trunk/unittests/Basic/FixedPointTest.cpp
Modified: cfe/trunk/unittests/Basic/FixedPointTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/FixedPointTest.cpp?rev=339038&r1=339037&r2=339038&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/FixedPointTest.cpp (original)
+++ cfe/trunk/unittests/Basic/FixedPointTest.cpp Mon Aug 6 11:02:16 2018
@@ -601,51 +601,6 @@ TEST(FixedPoint, SAccumConversionOverflo
-549755813888);
}
-void CheckSaturatedConversionToFractMax(FixedPointSemantics Src,
- int64_t OneVal) {
- CheckSaturatedConversionMax(Src, Saturated(getSFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getLFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getUSFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getUFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getPadULFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getPadUSFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getPadUFractSema()), OneVal);
- CheckSaturatedConversionMax(Src, Saturated(getPadULFractSema()), OneVal);
-}
-
-void CheckSaturatedConversionToFractMin(FixedPointSemantics Src,
- int64_t MinusOneVal) {
- CheckSaturatedConversionMin(Src, Saturated(getSFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getLFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getUSFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getUFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getPadULFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getPadUSFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getPadUFractSema()), MinusOneVal);
- CheckSaturatedConversionMin(Src, Saturated(getPadULFractSema()), MinusOneVal);
-}
-
-TEST(FixedPoint, OverflowConversionsToFract) {
- CheckSaturatedConversionToFractMax(getSAccumSema(), 128);
- CheckSaturatedConversionToFractMin(getSAccumSema(), -128);
- CheckSaturatedConversionToFractMax(getAccumSema(), 32768);
- CheckSaturatedConversionToFractMin(getAccumSema(), -32768);
- CheckSaturatedConversionToFractMax(getLAccumSema(), 2147483648);
- CheckSaturatedConversionToFractMin(getLAccumSema(), -2147483648);
-
- // Unsigned
- CheckSaturatedConversionToFractMax(getUSAccumSema(), 256);
- CheckSaturatedConversionToFractMax(getUAccumSema(), 65536);
- CheckSaturatedConversionToFractMax(getULAccumSema(), 4294967296);
-
- // Padded unsigned
- CheckSaturatedConversionToFractMax(getPadUSAccumSema(), 128);
- CheckSaturatedConversionToFractMax(getPadUAccumSema(), 32768);
- CheckSaturatedConversionToFractMax(getPadULAccumSema(), 2147483648);
-}
-
TEST(FixedPoint, GetValueSignAfterConversion) {
APFixedPoint Fixed(255 << 7, getSAccumSema());
ASSERT_TRUE(Fixed.getValue().isSigned());
More information about the cfe-commits
mailing list