summaryrefslogtreecommitdiffstats
path: root/unittests/ADT/APIntTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/APIntTest.cpp')
-rw-r--r--unittests/ADT/APIntTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp
index 498f50c..e4398f0 100644
--- a/unittests/ADT/APIntTest.cpp
+++ b/unittests/ADT/APIntTest.cpp
@@ -134,6 +134,12 @@ TEST(APIntTest, i1) {
EXPECT_EQ(one, neg_one);
EXPECT_EQ(two, neg_two);
+ // Min/max signed values.
+ EXPECT_TRUE(zero.isMaxSignedValue());
+ EXPECT_FALSE(one.isMaxSignedValue());
+ EXPECT_FALSE(zero.isMinSignedValue());
+ EXPECT_TRUE(one.isMinSignedValue());
+
// Additions.
EXPECT_EQ(two, one + one);
EXPECT_EQ(zero, neg_one + one);
OpenPOWER on IntegriCloud