From 55f6640caef25712a0e0a30776e97e5d3917ee55 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 24 Jun 2014 11:13:18 -0700 Subject: [PATCH] Fix test. --- test/format-test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/format-test.cc b/test/format-test.cc index 07872dd8..d03de9fd 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1662,17 +1662,17 @@ TEST(StrTest, Convert) { EXPECT_EQ("2012-12-9", s); } -fmt::Writer test(int n, const char *format, const fmt::ArgList &args) { +std::string test(int n, const char *format, const fmt::ArgList &args) { fmt::Writer w; w << n; w.format(format, args); - return std::move(w); + return w.str(); } -FMT_VARIADIC(fmt::Writer, test, int, const char *) +FMT_VARIADIC(std::string, test, int, const char *) TEST(FormatTest, VariadicMacro) { - EXPECT_EQ("42 end", str(test(42, " end"))); - EXPECT_EQ("42 abc", str(test(42, " {}", "abc"))); - EXPECT_EQ("42 abc 1.2", str(test(42, " {} {}", "abc", 1.2))); + EXPECT_EQ("42 end", test(42, " end")); + EXPECT_EQ("42 abc", test(42, " {}", "abc")); + EXPECT_EQ("42 abc 1.2", test(42, " {} {}", "abc", 1.2)); }