/* Need to call getShaders() manually to detect any issue in the
* shader test file, like invalid test commands or the file doesn't exist.
*/
- if (testCase->getShaders())
- vkRunnerTests->addChild(testCase);
- else
- delete testCase;
+ testCase->getShaders();
+ vkRunnerTests->addChild(testCase);
}
// Add some tests of the sqrt function using the templating mechanism
* replacements in the shader test. Otherwise, VkRunner will fail when found
* unknown commands or invalid sentences when processing the shader test file.
*/
- if (testCase->getShaders())
- vkRunnerTests->addChild(testCase);
- else
- delete testCase;
+ testCase->getShaders();
+ vkRunnerTests->addChild(testCase);
}
}
TestInstance* VkRunnerTestCase::createInstance(Context& ctx) const
{
+ if (m_testCaseData.script == DE_NULL)
+ TCU_THROW(InternalError, "Could not find script file");
+
return new VkRunnerTestInstance(ctx, m_testCaseData);
}