Binary parser: unknown opcode without the flag -> error.
| 61 | |
| 62 | // Binary parser: unknown opcode without the flag -> error. |
| 63 | TEST_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. |
| 77 | TEST_F(HandleUnknownOpcodesTest, ParseUnknownOpcodeWithFlagSucceeds) { |
nothing calls this directly
no test coverage detected