MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/expression/tests/StringWriterTest.cpp:40–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38class StringWriterTest : public functions::test::FunctionBaseTest {};
39
40TEST_F(StringWriterTest, append) {
41 auto vector = makeFlatVector<StringView>(2);
42 auto writer = exec::StringWriter<>(vector.get(), 0);
43 writer.append("1 "_sv);
44 writer.append(std::string_view("2 "));
45 writer.append("3 "_sv);
46 writer.append(std::string("4 "));
47 writer.append(folly::StringPiece("5 "));
48
49 writer.finalize();
50
51 ASSERT_EQ(vector->valueAt(0), StringView("1 2 3 4 5 "));
52}
53
54TEST_F(StringWriterTest, plusOperator) {
55 auto vector = makeFlatVector<StringView>(1);

Callers

nothing calls this directly

Calls 6

StringViewClass · 0.50
getMethod · 0.45
appendMethod · 0.45
finalizeMethod · 0.45
valueAtMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected