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

Function TEST_F

test/handle_unknown_opcodes_test.cpp:63–74  ·  view source on GitHub ↗

Binary parser: unknown opcode without the flag -> error.

Source from the content-addressed store, hash-verified

61
62// Binary parser: unknown opcode without the flag -> error.
63TEST_F(HandleUnknownOpcodesTest, ParseUnknownOpcodeWithoutFlagFails) {
64 std::vector<uint32_t> binary = spvtest::Concatenate({
65 MakeHeader(1),
66 {MakeFirstWord(1, kUnknownOpcode)},
67 });
68 spv_diagnostic diag = nullptr;
69 const spv_result_t result =
70 spvBinaryParseWithOptions(context_, nullptr, binary.data(), binary.size(),
71 nullptr, nullptr, &diag, 0u);
72 EXPECT_NE(SPV_SUCCESS, result);
73 spvDiagnosticDestroy(diag);
74}
75
76// Binary parser: unknown opcode with the flag -> success.
77TEST_F(HandleUnknownOpcodesTest, ParseUnknownOpcodeWithFlagSucceeds) {

Callers

nothing calls this directly

Calls 13

ConcatenateFunction · 0.85
MakeHeaderFunction · 0.85
MakeFirstWordFunction · 0.85
spvDiagnosticDestroyFunction · 0.85
spvBinaryToTextFunction · 0.85
spvTextDestroyFunction · 0.85
spvTextToBinaryFunction · 0.85
spvBinaryDestroyFunction · 0.85
NameForIdMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected