| 186 | ::testing::TestWithParam<InstructionFoldingCase<uint32_t>>; |
| 187 | |
| 188 | TEST_P(IntegerInstructionFoldingTest, Case) { |
| 189 | const auto& tc = GetParam(); |
| 190 | |
| 191 | std::unique_ptr<IRContext> context; |
| 192 | Instruction* inst; |
| 193 | std::tie(context, inst) = |
| 194 | FoldInstruction(tc.test_body, tc.id_to_fold, SPV_ENV_UNIVERSAL_1_1); |
| 195 | CheckForExpectedScalarConstant( |
| 196 | inst, tc.expected_result, [](const analysis::Constant* c) { |
| 197 | return c->AsScalarConstant()->GetU32BitValue(); |
| 198 | }); |
| 199 | } |
| 200 | |
| 201 | // Returns a common SPIR-V header for all of the test that follow. |
| 202 | #define INT_0_ID 100 |
nothing calls this directly
no test coverage detected