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

Method appendHexTest

Tests/Libraries/Strings/StringBuilderTest.cpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void SC::StringBuilderTest::appendHexTest()
72{
73 //! [stringBuilderTestAppendHexSnippet]
74 uint8_t bytes[4] = {0x12, 0x34, 0x56, 0x78};
75
76 String buffer;
77 auto builder = StringBuilder::create(buffer);
78 SC_TEST_EXPECT(builder.appendHex({bytes, sizeof(bytes)}, StringBuilder::AppendHexCase::UpperCase));
79 SC_TEST_EXPECT(builder.finalize() == "12345678");
80 //! [stringBuilderTestAppendHexSnippet]
81}
82
83void SC::StringBuilderTest::formatTest()
84{

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
finalizeMethod · 0.45

Tested by

no test coverage detected