We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 730fc47 commit b9ce79dCopy full SHA for b9ce79d
test/CMakeLists.txt
@@ -255,3 +255,13 @@ if (FMT_CUDA_TEST)
255
add_test(NAME cuda-test COMMAND fmt-in-cuda-test)
256
endif ()
257
258
+
259
+add_fmt_test(size-opt-test HEADER_ONLY)
260
+# Apply size optimization definitions from recipe
261
+target_compile_definitions(size-opt-test PRIVATE
262
+ FMT_USE_EXCEPTIONS=0
263
+ FMT_OS=0
264
+ FMT_BUILTIN_TYPES=0
265
+ FMT_OPTIMIZE_SIZE=2
266
+ FMT_USE_LOCALE=0
267
+)
test/size-opt-test.cc
@@ -0,0 +1,8 @@
1
+#include "fmt/format.h"
2
+#include "gtest/gtest.h"
3
4
+TEST(SizeOptTest, BasicFormatting) {
5
+ // Test basic formatting under size-optimized, header-only configuration
6
+ auto s = fmt::format("size-optimized {}", 42);
7
+ ASSERT_EQ(s, "size-optimized 42");
8
+}
0 commit comments