| 29 | using PeelingTest = PassTest<::testing::Test>; |
| 30 | |
| 31 | bool Validate(const std::vector<uint32_t>& bin) { |
| 32 | spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2; |
| 33 | spv_context spvContext = spvContextCreate(target_env); |
| 34 | spv_diagnostic diagnostic = nullptr; |
| 35 | spv_const_binary_t binary = {bin.data(), bin.size()}; |
| 36 | spv_result_t error = spvValidate(spvContext, &binary, &diagnostic); |
| 37 | if (error != 0) spvDiagnosticPrint(diagnostic); |
| 38 | spvDiagnosticDestroy(diagnostic); |
| 39 | spvContextDestroy(spvContext); |
| 40 | return error == 0; |
| 41 | } |
| 42 | |
| 43 | void Match(const std::string& checks, IRContext* context) { |
| 44 | // Silence unused warnings with !defined(SPIRV_EFFCE) |
no test coverage detected