fmt/test
Mart Slot 0aa4721472 Compile-time error on too many arguments provided
Adds a compile time error if the number of arguments provided to the
format function is larger than the number of braces in the format
string.
Only works in automatic argument indexing mode.

This check deliberately only works for compile-time format string
checking, not at runtime. This is because we don't want existing code to
have unexpected runtime errors after upgrades. There are also scenarios
imaginable where either the arguments or the format string is generated
at runtime, and the ability to have less braces in the format string can
actually be a feature. At the same time, compile-time format calls are
guaranteed to be constant. In other words, having too many arguments will
always mean there's a bug in the code.

The new feature works by adding a on_end_of_string() function to
formatting handlers. This function is called after the whole format
string has been parsed, and needs to be implemented by all parsing
handlers.
2019-09-24 08:44:01 +00:00
..
add-subdirectory-test Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736) 2018-06-06 15:57:59 +02:00
compile-error-test prepare -> compile 2019-07-25 19:39:41 +03:00
cuda-test Add a CUDA test 2019-08-30 17:45:50 -07:00
find-package-test Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736) 2018-06-06 15:57:59 +02:00
fuzzing Apply clang format and other minor formatting tweaks 2019-06-30 08:52:15 -07:00
gmock Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736) 2018-06-06 15:57:59 +02:00
gtest Fix error on MinGW 2017-03-09 06:09:43 -08:00
assert-test.cc Fix EXPECT_DEBUG_DEATH_IF_SUPPORTED (#1214) 2019-07-04 07:55:36 -07:00
chrono-test.cc add oss-fuzz support 2019-06-30 06:10:07 -07:00
CMakeLists.txt Add -Werror to tests 2019-08-31 09:26:45 -07:00
color-test.cc Fix format overload that takes text_style (#1305) 2019-09-08 18:41:02 -07:00
compile-test.cc Simplify format string compilation 2019-09-02 06:48:19 -07:00
core-test.cc get_type -> mapped_type_constant 2019-06-11 07:23:39 -07:00
custom-formatter-test.cc Make buffer_range public and update custom formatting docs (#1281) 2019-08-28 06:50:20 -07:00
format Remove unused code and refactor 2019-09-01 13:08:53 -07:00
format-impl-test.cc Add max_value 2019-09-08 09:21:30 -07:00
format-test.cc Compile-time error on too many arguments provided 2019-09-24 08:44:01 +00:00
gmock-gtest-all.cc Format the code using clang-format 2019-01-13 06:58:20 -08:00
grisu-test.cc Fix small number rounding with fixed precision in grisu 2019-07-04 07:11:40 -07:00
gtest-extra-test.cc FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
gtest-extra.cc Format the code using clang-format 2019-01-13 06:58:20 -08:00
gtest-extra.h FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
header-only-test2.cc Add a lightweight header for the core API 2017-12-06 07:42:42 -08:00
header-only-test.cc Add a lightweight header for the core API 2017-12-06 07:42:42 -08:00
locale-test.cc Workaround a broken C locale on Windows 2019-07-25 12:55:23 +03:00
mock-allocator.h Cleanup 2019-06-15 09:44:51 -07:00
ostream-test.cc Disable integral operator<< (#1316) 2019-09-23 20:34:08 -07:00
posix-mock-test.cc typedef -> using 2019-07-07 17:14:26 -07:00
posix-mock.h Format the code using clang-format 2019-01-13 06:58:20 -08:00
posix-test.cc Remove redundant and nonportable test (#1313) 2019-09-23 13:36:12 -07:00
printf-test.cc Add max_value 2019-09-08 09:21:30 -07:00
ranges-test.cc Workaround an issue with std::filesystem::path being an infinitely deep range (#1268) 2019-08-21 11:22:59 -07:00
scan-test.cc Add preliminary user-defined type support 2019-06-08 09:04:46 -07:00
scan.h Compile-time error on too many arguments provided 2019-09-24 08:44:01 +00:00
std-format-test.cc Make numeric alignment optional 2019-09-06 09:43:53 -07:00
test-assert.h Format the code using clang-format 2019-01-13 06:58:20 -08:00
test-main.cc Format the code using clang-format 2019-01-13 06:58:20 -08:00
util.cc Format the code using clang-format 2019-01-13 06:58:20 -08:00
util.h FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00