- GL::SL::Tokenizer tokenizer;
- tokenizer.begin("<output>", output);
+ verify_output(output, i->second);
+ }
+
+ for(const auto &s: test_case->expected_output)
+ if(find(stages, s.first)==stages.end())
+ fail(format("Compiler didn't produce stage %s", GL::SL::Stage::get_stage_name(s.first)));
+}
+
+void GlslCompilerTest::verify_output(const string &output, const string &expected)
+{
+ GL::SL::Tokenizer tokenizer;
+ tokenizer.begin(output, "<output>");
+
+ GL::SL::Tokenizer expected_tkn;
+ expected_tkn.begin(expected, "<expected>");
+
+ while(1)
+ {
+ string token = expected_tkn.parse_token();