mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
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 llvm-svn: 275723
This commit is contained in:
parent
adedbb37b0
commit
4c92f7751d
@ -121,11 +121,15 @@ TEST(MathExtras, isUIntN) {
|
||||
TEST(MathExtras, maxIntN) {
|
||||
EXPECT_EQ(32767, maxIntN(16));
|
||||
EXPECT_EQ(2147483647, maxIntN(32));
|
||||
EXPECT_EQ(std::numeric_limits<int32_t>::max(), maxIntN(32));
|
||||
EXPECT_EQ(std::numeric_limits<int64_t>::max(), maxIntN(64));
|
||||
}
|
||||
|
||||
TEST(MathExtras, minIntN) {
|
||||
EXPECT_EQ(-32768LL, minIntN(16));
|
||||
EXPECT_EQ(-64LL, minIntN(7));
|
||||
EXPECT_EQ(std::numeric_limits<int32_t>::min(), minIntN(32));
|
||||
EXPECT_EQ(std::numeric_limits<int64_t>::min(), minIntN(64));
|
||||
}
|
||||
|
||||
TEST(MathExtras, maxUIntN) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user