MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / TEST_P

Function TEST_P

test/assembly_context_test.cpp:37–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35using EncodeStringTest = ::testing::TestWithParam<EncodeStringCase>;
36
37TEST_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
49INSTANTIATE_TEST_SUITE_P(

Callers

nothing calls this directly

Calls 5

AutoTextClass · 0.85
ConcatenateFunction · 0.85
MakeVectorFunction · 0.85
binaryEncodeStringMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected