From a1ec9fc771650ef4671452982f72b0ab58ed5895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Wed, 6 Jul 2022 19:57:20 +0200 Subject: [PATCH] #2968: Eliminate preprocessor condition that enables the test for the formatter specialization for std::filesystem::path --- test/std-test.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/std-test.cc b/test/std-test.cc index fc8f72a0..c22b3e38 100644 --- a/test/std-test.cc +++ b/test/std-test.cc @@ -14,10 +14,7 @@ #include "gtest/gtest.h" TEST(std_test, path) { -// Test ambiguity problem described in #2954. We need to exclude compilers -// where the ambiguity problem cannot be solved for now. -#if defined(__cpp_lib_filesystem) && \ - (!FMT_MSC_VERSION || FMT_MSC_VERSION >= 1920) +#ifdef __cpp_lib_filesystem EXPECT_EQ(fmt::format("{:8}", std::filesystem::path("foo")), "\"foo\" "); EXPECT_EQ(fmt::format("{}", std::filesystem::path("foo\"bar.txt")), "\"foo\\\"bar.txt\""); @@ -37,10 +34,8 @@ TEST(std_test, path) { } TEST(ranges_std_test, format_vector_path) { -// Test ambiguity problem described in #2954. We need to exclude compilers -// where the ambiguity problem cannot be solved for now. -#if defined(__cpp_lib_filesystem) && \ - (!FMT_MSC_VERSION || FMT_MSC_VERSION >= 1920) +// Test ambiguity problem described in #2954. +#ifdef __cpp_lib_filesystem auto p = std::filesystem::path("foo/bar.txt"); auto c = std::vector{"abc", "def"}; EXPECT_EQ(fmt::format("path={}, range={}", p, c),