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

Function TEST_F

test/val/val_image_test.cpp:539–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539TEST_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
552TEST_F(ValidateImage, TypeImageVoidSampledTypeVulkan) {
553 const std::string code = GetShaderHeader() + R"(

Callers

nothing calls this directly

Calls 7

GetShaderHeaderFunction · 0.85
TrivialMainFunction · 0.85
GetKernelHeaderFunction · 0.85
c_strMethod · 0.80
GenerateShaderCodeFunction · 0.70
GenerateKernelCodeFunction · 0.70

Tested by

no test coverage detected