llvm.org GIT mirror llvm / 5e704c7
Add tests for max/minIntN(64). Summary: Given that we had a bug on max/minUIntN(64), these should have tests too. Reviewers: rnk Subscribers: dylanmckay, llvm-commits Differential Revision: https://reviews.llvm.org/D22443 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275723 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Lebar 4 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
120120 TEST(MathExtras, maxIntN) {
121121 EXPECT_EQ(32767, maxIntN(16));
122122 EXPECT_EQ(2147483647, maxIntN(32));
123 EXPECT_EQ(std::numeric_limits::max(), maxIntN(32));
124 EXPECT_EQ(std::numeric_limits::max(), maxIntN(64));
123125 }
124126
125127 TEST(MathExtras, minIntN) {
126128 EXPECT_EQ(-32768LL, minIntN(16));
127129 EXPECT_EQ(-64LL, minIntN(7));
130 EXPECT_EQ(std::numeric_limits::min(), minIntN(32));
131 EXPECT_EQ(std::numeric_limits::min(), minIntN(64));
128132 }
129133
130134 TEST(MathExtras, maxUIntN) {