]> git.tdb.fi Git - libs/gl.git/commitdiff
Check that errors were generated as expected
authorMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 18:37:21 +0000 (20:37 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 23:00:31 +0000 (01:00 +0200)
tests/glsl/glslcompiler.cpp

index 8ff630555557e1bf5a3b7f1d7b5e7ece23d33027..fa6e588ef437d5e9f9455e0c3b8c3f91ce4f1281 100644 (file)
@@ -116,6 +116,9 @@ void GlslCompilerTest::run_test_case(const TestCase *test_case)
                throw;
        }
 
+       if(!test_case->expected_error.empty())
+               fail("Error expected but none thrown");
+
        auto stages = compiler.get_stages();
        for(auto s: stages)
        {