Skip to content

Commit e526349

Browse files
committed
Use C++ numeric_limits for testing constants in test file
1 parent 3c75084 commit e526349

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/static_checks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ TEST_CASE("Fixed::FRACTIONAL_MIN == Fixed::DECIMAL_MIN - (1 - Fixed::FRACTIONAL_
5454
}
5555

5656
TEST_CASE("Fixed::MAX() == Max 32-bit signed integer") {
57-
STATIC_REQUIRE(Fixed::MAX() == Fixed(INT_MAX));
57+
STATIC_REQUIRE(Fixed::MAX() == Fixed(std::numeric_limits<Fixed::UnderlyingType>::max()));
5858
}
5959

6060
TEST_CASE("Fixed::MIN() == Min 32-bit signed integer") {
61-
STATIC_REQUIRE(Fixed::MIN() == Fixed(INT_MIN));
61+
STATIC_REQUIRE(Fixed::MIN() == Fixed(std::numeric_limits<Fixed::UnderlyingType>::min()));
6262
}
6363

6464
TEST_CASE("typeof(Fixed::MAX()) == Fixed") {

0 commit comments

Comments
 (0)