diff --git a/test/printf-test.cc b/test/printf-test.cc index c44a7708..9bb9a62e 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -336,12 +336,13 @@ void TestLength(const char *length_spec) { TestLength(length_spec, -42); TestLength(length_spec, min); TestLength(length_spec, max); - if (min >= 0 || static_cast(min) > - std::numeric_limits::min()) { + using fmt::internal::check; + if (check(min >= 0 || static_cast(min) > + std::numeric_limits::min())) { TestLength(length_spec, fmt::LongLong(min) - 1); } fmt::ULongLong long_long_max = std::numeric_limits::max(); - if (max < 0 || static_cast(max) < long_long_max) + if (check(max < 0 || static_cast(max) < long_long_max)) TestLength(length_spec, fmt::LongLong(max) + 1); TestLength(length_spec, std::numeric_limits::min()); TestLength(length_spec, std::numeric_limits::max());