From a703799f8caa7b6cb19988a8e38f96299370e324 Mon Sep 17 00:00:00 2001 From: Mark Santaniello Date: Tue, 9 Aug 2022 16:32:08 -0700 Subject: [PATCH] Address feedback from Victor --- .github/workflows/linux.yml | 9 --------- test/compile-test.cc | 12 ++++-------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 331eec69..70085f5c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,19 +28,10 @@ jobs: std: 17 install: sudo apt install g++-8 os: ubuntu-18.04 - - cxx: g++-9 - build_type: Debug - std: 20 - install: sudo apt install g++-9 - os: ubuntu-18.04 - cxx: g++-10 build_type: Debug std: 17 os: ubuntu-18.04 - - cxx: g++-10 - build_type: Debug - std: 20 - os: ubuntu-18.04 - cxx: g++-11 build_type: Debug std: 20 diff --git a/test/compile-test.cc b/test/compile-test.cc index 52f61cb8..005c4993 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -227,18 +227,14 @@ TEST(compile_test, format_to_n) { EXPECT_STREQ("2a", buffer); } -TEST(compile_test, formatted_size) { #ifdef __cpp_lib_bit_cast - FMT_CONSTEXPR20 -#endif - size_t s1 = fmt::formatted_size(FMT_COMPILE("{0}"), 42); +TEST(compile_test, constexpr_formatted_size) { + FMT_CONSTEXPR20 size_t s1 = fmt::formatted_size(FMT_COMPILE("{0}"), 42); EXPECT_EQ(2, s1); -#ifdef __cpp_lib_bit_cast - FMT_CONSTEXPR20 -#endif -size_t s2 = fmt::formatted_size(FMT_COMPILE("{0:<4.2f}"), 42.0); + FMT_CONSTEXPR20 size_t s2 = fmt::formatted_size(FMT_COMPILE("{0:<4.2f}"), 42.0); EXPECT_EQ(5, s2); } +#endif TEST(compile_test, text_and_arg) { EXPECT_EQ(">>>42<<<", fmt::format(FMT_COMPILE(">>>{}<<<"), 42));