| 537 | } |
| 538 | |
| 539 | TEST_F(ValidateImage, TypeImageWrongSampledType) { |
| 540 | const std::string code = GetShaderHeader("", false) + R"( |
| 541 | %img_type = OpTypeImage %bool 2D 0 0 0 1 Unknown |
| 542 | )"; |
| 543 | |
| 544 | CompileSuccessfully(code.c_str()); |
| 545 | ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions()); |
| 546 | EXPECT_THAT(getDiagnosticString(), |
| 547 | HasSubstr("Expected Sampled Type to be either void or " |
| 548 | "numerical scalar " |
| 549 | "type")); |
| 550 | } |
| 551 | |
| 552 | TEST_F(ValidateImage, TypeImageVoidSampledTypeVulkan) { |
| 553 | const std::string code = GetShaderHeader() + R"( |
nothing calls this directly
no test coverage detected