Helper function to compile shader and check for specific error message.
| 29 | protected: |
| 30 | // Helper function to compile shader and check for specific error message. |
| 31 | bool compileShouldFailWith(const std::string& code, const std::string& expectedError, |
| 32 | EShLanguage stage = EShLangVertex) |
| 33 | { |
| 34 | glslang::TShader shader(stage); |
| 35 | EShMessages controls = static_cast<EShMessages>(EShMsgDefault | EShMsgSpvRules | EShMsgVulkanRules); |
| 36 | |
| 37 | bool success = compile(&shader, code, "", controls); |
| 38 | |
| 39 | if (success) { |
| 40 | // Compilation should have failed. |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | std::string errorLog = shader.getInfoLog(); |
| 45 | return errorLog.find(expectedError) != std::string::npos; |
| 46 | } |
| 47 | }; |
| 48 | |
| 49 | // Test that unsized arrays in uniform blocks work when extension is enabled. |
nothing calls this directly
no test coverage detected