MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/utils/string/string_helper_test.cc:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "gtest/gtest.h"
20
21TEST(StringHelper, EndsWith) {
22 std::string input("hello world");
23 std::string test1("world");
24 std::string test2("helloworld");
25 std::string test3("hello world hello world");
26
27 EXPECT_TRUE(paddle::string::ends_with(input, test1));
28 EXPECT_TRUE(paddle::string::ends_with(input, input));
29
30 EXPECT_FALSE(paddle::string::ends_with(input, test2));
31 EXPECT_FALSE(paddle::string::ends_with(input, test3));
32}
33
34TEST(StringHelper, FormatStringAppend) {
35 std::string str("hello");

Callers

nothing calls this directly

Calls 7

ends_withFunction · 0.85
format_string_appendFunction · 0.85
join_stringsFunction · 0.85
split_string_ptrFunction · 0.85
c_strMethod · 0.80
emplace_backMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected