From f5750892436a667fe622e5ecc8a02c15a5d9bc88 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 1 Dec 2023 08:52:42 -0800 Subject: [PATCH] Simplify test --- test/std-test.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/std-test.cc b/test/std-test.cc index 2e8ff177..f288e144 100644 --- a/test/std-test.cc +++ b/test/std-test.cc @@ -69,10 +69,9 @@ TEST(std_test, thread_id) { #ifdef __cpp_lib_source_location TEST(std_test, source_location) { std::source_location loc = std::source_location::current(); - EXPECT_EQ(fmt::format("{}", loc), std::string(loc.file_name()) + ":" + - std::to_string(loc.line()) + ":" + - std::to_string(loc.column()) + ": " + - loc.function_name()); + EXPECT_EQ(fmt::format("{}", loc), + fmt::format("{}:{}:{}: {}", loc.file_name(), loc.line(), + loc.column(), loc.function_name())); } #endif