]> git.tdb.fi Git - libs/gl.git/commitdiff
Check for extra error lines in compiler output
authorMikko Rasa <tdb@tdb.fi>
Mon, 8 Mar 2021 00:49:03 +0000 (02:49 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 8 Mar 2021 13:28:54 +0000 (15:28 +0200)
Somehow I thought this was handled already

tests/glsl/glslcompiler.cpp

index fa6e588ef437d5e9f9455e0c3b8c3f91ce4f1281..acca61d36a217e7bec5dcc572576209a5bfb3244 100644 (file)
@@ -201,6 +201,8 @@ void GlslCompilerTest::verify_error(const string &output, const string &expected
        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)));
 }