From 8b9bd1650591b8f6ae2d3c5b0042848fe02af2ef Mon Sep 17 00:00:00 2001 From: chentianyu03 Date: Tue, 10 Aug 2021 19:03:15 +0800 Subject: [PATCH] fix format_string_append test cast,test=develop (#34753) --- paddle/fluid/string/string_helper_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/string/string_helper_test.cc b/paddle/fluid/string/string_helper_test.cc index deeb4bdcc82..4796bf7507a 100644 --- a/paddle/fluid/string/string_helper_test.cc +++ b/paddle/fluid/string/string_helper_test.cc @@ -33,10 +33,10 @@ TEST(StringHelper, EndsWith) { TEST(StringHelper, FormatStringAppend) { std::string str("hello"); - char fmt[] = "hhh"; + char fmt[] = "%d"; - paddle::string::format_string_append(str, fmt); - EXPECT_EQ(str, "hellohhh"); + paddle::string::format_string_append(str, fmt, 10); + EXPECT_EQ(str, "hello10"); } TEST(StringHelper, JoinStrings) { -- GitLab