X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tests%2Fglsl%2Fglslcompiler.cpp;h=8ff630555557e1bf5a3b7f1d7b5e7ece23d33027;hb=5f6ee612cb83029de9559bae644c9a3b4e579259;hp=70ccf3b200f733504d89583396e1fb9594c3d9d8;hpb=063365a2e3ee9bd8d520e7115e8c0319e3736906;p=libs%2Fgl.git diff --git a/tests/glsl/glslcompiler.cpp b/tests/glsl/glslcompiler.cpp index 70ccf3b2..8ff63055 100644 --- a/tests/glsl/glslcompiler.cpp +++ b/tests/glsl/glslcompiler.cpp @@ -99,9 +99,9 @@ const GlslCompilerTest::TestCase &GlslCompilerTest::load_test_case(const string void GlslCompilerTest::run_test_case(const TestCase *test_case) { GL::SL::Compiler compiler(GL::SL::Features::all()); - compiler.set_source(test_case->source, ""); try { + compiler.set_source(test_case->source, ""); compiler.compile(GL::SL::Compiler::PROGRAM); } catch(const GL::SL::invalid_shader_source &exc) @@ -197,6 +197,9 @@ void GlslCompilerTest::verify_error(const string &output, const string &expected ++i; while(j!=expected.end() && isspace(*j)) ++j; + + if(j!=expected.end()) + fail(format("Missing error line: %s", extract_line(expected, j))); } string GlslCompilerTest::extract_line(const string &text, const string::const_iterator &iter)