Allow some compiler warnings in favor of passing unit tests ...

This commit is contained in:
Matthias Koefferlein 2019-05-27 18:55:27 +02:00
parent 419ed7dd78
commit 7f6afe1f8b
1 changed files with 5 additions and 5 deletions

View File

@ -72,7 +72,7 @@ static void run_test_int (tl::TestBase *_this, I1 a, I2 b)
EXPECT_EQ (to_i (ae + be), a + b);
r = ae;
r += be;
EXPECT_EQ (I1 (to_i (r)), a + I1 (b));
EXPECT_EQ (to_i (r), a + b);
EXPECT_EQ (to_i (ae + basic_type (2)), a + basic_type (2));
r = ae;
r += basic_type (2);
@ -81,7 +81,7 @@ static void run_test_int (tl::TestBase *_this, I1 a, I2 b)
EXPECT_EQ (to_i (ae - be), a - b);
r = ae;
r -= be;
EXPECT_EQ (I1 (to_i (r)), a - I1 (b));
EXPECT_EQ (to_i (r), a - b);
EXPECT_EQ (to_i (ae - basic_type (2)), a - basic_type (2));
r = ae;
r -= basic_type (2);
@ -98,17 +98,17 @@ static void run_test_int (tl::TestBase *_this, I1 a, I2 b)
EXPECT_EQ (to_i (ae * be), a * b);
r = ae;
r *= be;
EXPECT_EQ (I1 (to_i (r)), a * I1 (b));
EXPECT_EQ (to_i (r), a * b);
if (b != 0) {
EXPECT_EQ (to_i (ae / be), a / b);
r = ae;
r /= be;
EXPECT_EQ (I1 (to_i (r)), a / I1 (b));
EXPECT_EQ (to_i (r), a / b);
EXPECT_EQ (to_i (ae % be), a % b);
r = ae;
r %= be;
EXPECT_EQ (I1 (to_i (r)), a % I1 (b));
EXPECT_EQ (to_i (r), a % b);
}
}