MCPcopy Create free account
hub / github.com/Snapchat/Valdi / TEST

Function TEST

valdi/test/runtime/StaticString_tests.cpp:21–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace ValdiTest {
20
21TEST(StaticString, canCreateUTF8String) {
22 std::string myString = "Hello World";
23
24 auto staticString = StaticString::makeUTF8(myString.data(), myString.size());
25
26 ASSERT_EQ(std::string_view(myString), std::string_view(staticString->utf8Data(), staticString->size()));
27}
28
29TEST(StaticString, nullTerminatesUTF8String) {
30 std::string myString = "Hello World";

Callers

nothing calls this directly

Calls 9

makeUtf32StringFunction · 0.85
utf8DataMethod · 0.80
utf16DataMethod · 0.80
utf32DataMethod · 0.80
utf8StorageMethod · 0.80
utf16StorageMethod · 0.80
utf32StorageMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected