| 7 | |
| 8 | namespace mdf::test { |
| 9 | TEST(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 | } |