MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / appendTest

Method appendTest

Tests/Libraries/Strings/StringBuilderTest.cpp:42–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40};
41
42void SC::StringBuilderTest::appendTest()
43{
44 //! [stringBuilderTestAppendSnippet]
45 String buffer(StringEncoding::Ascii); // or SmallString<N> / Buffer
46 auto builder = StringBuilder::create(buffer); // or StringBuilder::createAppend(buffer)
47 SC_TEST_EXPECT(builder.append("Salve"));
48 SC_TEST_EXPECT(builder.append(" {1} {0}!!!", "tutti", "a"));
49 SC_ASSERT_RELEASE(builder.finalize() == "Salve a tutti!!!");
50 //! [stringBuilderTestAppendSnippet]
51}
52
53void SC::StringBuilderTest::appendReplaceAllTest()
54{

Callers

nothing calls this directly

Calls 3

createFunction · 0.85
appendMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected