Eliminate extra-test and merge it into existing std-test instead. Add conditionals for filesystem::path testing that does not run into the ambiguity problem.
This commit is contained in:
parent
d51148599a
commit
6d14574087
@ -78,7 +78,6 @@ add_fmt_test(printf-test)
|
|||||||
add_fmt_test(ranges-test ranges-odr-test.cc)
|
add_fmt_test(ranges-test ranges-odr-test.cc)
|
||||||
add_fmt_test(scan-test)
|
add_fmt_test(scan-test)
|
||||||
add_fmt_test(std-test)
|
add_fmt_test(std-test)
|
||||||
add_fmt_test(ranges-std-test)
|
|
||||||
try_compile(compile_result_unused
|
try_compile(compile_result_unused
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
SOURCES ${CMAKE_CURRENT_LIST_DIR}/detect-stdfs.cc
|
SOURCES ${CMAKE_CURRENT_LIST_DIR}/detect-stdfs.cc
|
||||||
@ -86,7 +85,6 @@ try_compile(compile_result_unused
|
|||||||
string(REGEX REPLACE ".*libfound \"([^\"]*)\".*" "\\1" STDLIBFS "${RAWOUTPUT}")
|
string(REGEX REPLACE ".*libfound \"([^\"]*)\".*" "\\1" STDLIBFS "${RAWOUTPUT}")
|
||||||
if (STDLIBFS)
|
if (STDLIBFS)
|
||||||
target_link_libraries(std-test ${STDLIBFS})
|
target_link_libraries(std-test ${STDLIBFS})
|
||||||
target_link_libraries(ranges-std-test ${STDLIBFS})
|
|
||||||
endif ()
|
endif ()
|
||||||
add_fmt_test(unicode-test HEADER_ONLY)
|
add_fmt_test(unicode-test HEADER_ONLY)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
// Formatting library for C++ - tests for ranges and std combination
|
|
||||||
//
|
|
||||||
// Copyright (c) 2012 - present, Victor Zverovich
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// For the license information refer to format.h.
|
|
||||||
//
|
|
||||||
// Copyright (c) 2022 - present, Dani-Hub (Daniel Kruegler)
|
|
||||||
// All rights reserved
|
|
||||||
|
|
||||||
#include "fmt/ranges.h"
|
|
||||||
#include "fmt/std.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
|
||||||
|
|
||||||
TEST(ranges_std_test, format_vector_path) {
|
|
||||||
#ifdef __cpp_lib_filesystem
|
|
||||||
auto p = std::filesystem::path("foo/bar.txt");
|
|
||||||
auto c = std::vector<std::string>{"abc", "def"};
|
|
||||||
EXPECT_EQ(fmt::format("path={}, range={}", p, c),
|
|
||||||
"path=\"foo/bar.txt\", range=[\"abc\", \"def\"]");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user