MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / TEST

Function TEST

lib/mdflib/mdflib_test/src/testhelper.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8namespace mdf::test {
9TEST(TestMdfHelper, TextToByteArray) // NOLINT
10{
11 constexpr std::string_view input_text = "ABCDEFG";
12 const auto byte_array = MdfHelper::TextToByteArray(input_text.data());
13 EXPECT_EQ(byte_array.size(),input_text.size());
14 for (size_t index = 0; index < byte_array.size(); ++index) {
15 EXPECT_TRUE(input_text[index] ==
16 static_cast<const char>(byte_array[index]))
17 << input_text[index] << " " << static_cast<const char>(byte_array[index]);
18 }
19}
20
21}

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected