From 978d3657b9b46f17aea4dcf5f910c45aeab3c257 Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Sun, 23 Apr 2023 13:25:02 +0200 Subject: [PATCH] Clang 16.0: disable compile format string testing in `module-test.cpp` Clang cannot import user-defined literals as it seems. --- test/module-test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/module-test.cc b/test/module-test.cc index a53f8a57da5ab..0f51cedd114af 100644 --- a/test/module-test.cc +++ b/test/module-test.cc @@ -507,10 +507,14 @@ TEST(module_test, custom_context) { TEST(module_test, compile_format_string) { using namespace fmt::literals; +#ifdef __clang__ + fmt::println("\033[0;33m[=disabled=] {}\033[0;0m", "Clang 16.0 fails to import user-defined literals"); +#else EXPECT_EQ("42", fmt::format("{0:x}"_cf, 0x42)); EXPECT_EQ(L"42", fmt::format(L"{:}"_cf, 42)); EXPECT_EQ("4.2", fmt::format("{arg:3.1f}"_cf, "arg"_a = 4.2)); EXPECT_EQ(L" 42", fmt::format(L"{arg:>3}"_cf, L"arg"_a = L"42")); +#endif } TEST(module_test, std_types) {