void GlslCompilerTest::run_test_case(const TestCase *test_case)
{
GL::SL::Compiler compiler(GL::SL::Features::all());
- compiler.set_source(test_case->source, "<test>");
try
{
+ compiler.set_source(test_case->source, "<test>");
compiler.compile(GL::SL::Compiler::PROGRAM);
}
catch(const GL::SL::invalid_shader_source &exc)
throw;
}
+ if(!test_case->expected_error.empty())
+ fail("Error expected but none thrown");
+
auto stages = compiler.get_stages();
for(auto s: stages)
{
while(j!=expected.end() && isspace(*j))
++j;
+ if(i!=output.end())
+ fail(format("Extra error line: %s", extract_line(output, i)));
if(j!=expected.end())
fail(format("Missing error line: %s", extract_line(expected, j)));
}