| 35 | using EncodeStringTest = ::testing::TestWithParam<EncodeStringCase>; |
| 36 | |
| 37 | TEST_P(EncodeStringTest, Sample) { |
| 38 | AssemblyContext context(AutoText(""), nullptr); |
| 39 | spv_instruction_t inst; |
| 40 | inst.words = GetParam().initial_contents; |
| 41 | ASSERT_EQ(SPV_SUCCESS, |
| 42 | context.binaryEncodeString(GetParam().str.c_str(), &inst)); |
| 43 | // We already trust MakeVector |
| 44 | EXPECT_THAT(inst.words, Eq(Concatenate({GetParam().initial_contents, |
| 45 | utils::MakeVector(GetParam().str)}))); |
| 46 | } |
| 47 | |
| 48 | // clang-format off |
| 49 | INSTANTIATE_TEST_SUITE_P( |
nothing calls this directly
no test coverage detected