aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
-rw-r--r--llvm/unittests/Support/MathExtrasTest.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp
index 0f38546..8bd47e3 100644
--- a/llvm/unittests/Support/MathExtrasTest.cpp
+++ b/llvm/unittests/Support/MathExtrasTest.cpp
@@ -190,21 +190,4 @@ TEST(MathExtras, RoundUpToAlignment) {
EXPECT_EQ(552u, RoundUpToAlignment(321, 255, 42));
}
-template<typename T>
-void SaturatingAddTestHelper()
-{
- const T Max = std::numeric_limits<T>::max();
- EXPECT_EQ(T(3), SaturatingAdd(T(1), T(2)));
- EXPECT_EQ(Max, SaturatingAdd(Max, T(1)));
- EXPECT_EQ(Max, SaturatingAdd(T(1), Max));
- EXPECT_EQ(Max, SaturatingAdd(Max, Max));
-}
-
-TEST(MathExtras, SaturatingAdd) {
- SaturatingAddTestHelper<uint8_t>();
- SaturatingAddTestHelper<uint16_t>();
- SaturatingAddTestHelper<uint32_t>();
- SaturatingAddTestHelper<uint64_t>();
-}
-
}