Victor Zverovich 7690aa5574 Simplify float to integral duration_cast and its tests
Compute the upper bound as 2^digits with std::ldexp instead of
static_cast<FromRep>(max) + 1, which is only exact when rounding to
nearest: with FE_UPWARD in an unoptimized build the bound became
2^63 + 2048 and a count of 2^63 reached the undefined conversion.
Truncate the count once and use it for both the check and the cast.

Skip the checks that need safe duration casts when
FMT_SAFE_DURATION_CAST is 0, where the NaN time point check failed.
Drop the 1e300 time point and two bool assertions, which don't catch
anything the others don't, and test max + 1 and NaN directly.
2026-11-06 09:43:42 -08:00
..
add-subdirectory-test Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
compile-error-test Avoid dropping null byte in format string (#4732) 2026-04-23 09:34:27 -07:00
cuda-test Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
find-package-test Bump tested CMake version to 3.25 2022-11-30 08:09:32 -08:00
fuzzing Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
gtest Apply cmake-format 2026-03-03 15:49:40 -08:00
static-export-test Bump tested CMake version to 3.25 2022-11-30 08:09:32 -08:00
args-test.cc Simplify named_arg_count test 2026-09-11 08:05:34 -07:00
assert-test.cc Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
c-test.c Add a test for fmt_print 2026-06-08 08:18:43 +02:00
chrono-test.cc Simplify float to integral duration_cast and its tests 2026-11-06 09:43:42 -08:00
CMakeLists.txt Run format tests without locale support 2026-09-27 10:15:42 -07:00
color-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
compile-test.cc Fix formatting of nullptr with FMT_COMPILE and to_string (#4993) 2026-10-25 09:30:45 -07:00
core-test.cc Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
detect-stdfs.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
enforce-checks-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
enum-test.cc Format enums annotated with fmt::as_underlying 2026-09-26 11:07:11 -07:00
format-impl-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
format-test.cc Fix zero padding for localized integers (#4994) 2026-10-31 10:15:44 -07:00
gtest-extra-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
gtest-extra.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
gtest-extra.h Unify copyright notices 2026-05-31 08:54:06 -07:00
header-only-test.cc Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
mock-allocator.h Unify copyright notices 2026-05-31 08:54:06 -07:00
module-test.cc Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
no-builtin-types-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
noexception-test.cc Make base.h a compatibility header 2026-09-07 17:11:35 -07:00
os-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
ostream-test.cc Enable ASan and UBSan in supported Linux CI builds (#4969) 2026-10-08 11:42:47 -07:00
perf-sanity.cc Cleanup test 2024-07-17 06:59:24 -07:00
posix-mock-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
posix-mock.h Unify copyright notices 2026-05-31 08:54:06 -07:00
printf-test.cc Simplify printf flag tests 2026-10-17 07:16:33 -07:00
ranges-odr-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
ranges-test.cc Remove redundant escape tests 2026-10-04 08:30:56 -07:00
scan-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
scan.h Unify copyright notices 2026-05-31 08:54:06 -07:00
std-test.cc Fix out-of-bounds read in error code format parsing (#4934) 2026-09-07 11:35:29 -07:00
test-assert.h Unify copyright notices 2026-05-31 08:54:06 -07:00
test-main.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
unicode-test.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
util.cc Unify copyright notices 2026-05-31 08:54:06 -07:00
util.h Unify copyright notices 2026-05-31 08:54:06 -07:00
xchar-test.cc Use the locale decimal point in localized hexfloat formatting (#4992) 2026-10-24 11:15:30 -07:00