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

Function TEST

test/opcode_lookup_test.cpp:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 }));
78
79TEST(OpcodeLookupSingleTest, OpcodeLookup_ByOpcode_Fails) {
80 // This list may need adjusting over time.
81 std::array<uint32_t, 3> bad_opcodes = {{99999, 37737, 110101}};
82 for (auto bad_opcode : bad_opcodes) {
83 const InstructionDesc* desc = nullptr;
84 spv::Op opcode = static_cast<spv::Op>(bad_opcode);
85 auto status = LookupOpcode(opcode, &desc);
86 EXPECT_NE(status, SPV_SUCCESS);
87 ASSERT_EQ(desc, nullptr);
88 }
89}
90
91struct OpcodeLookupEnvCase {
92 std::string name;

Callers

nothing calls this directly

Calls 5

LookupOpcodeFunction · 0.85
operandsMethod · 0.80
countMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected