Commit bbb19cf5 authored by jbeder's avatar jbeder
Browse files

Added parsing of output to emitter tests

parent bf2bb91d
...@@ -872,7 +872,16 @@ namespace Test ...@@ -872,7 +872,16 @@ namespace Test
std::string output = out.c_str(); std::string output = out.c_str();
if(output == desiredOutput) { if(output == desiredOutput) {
try {
std::stringstream stream(output);
YAML::Parser parser;
YAML::Node node;
parser.GetNextDocument(node);
passed++; passed++;
} catch(const YAML::Exception& e) {
std::cout << "Emitter test failed: " << name << "\n";
std::cout << "Parsing output error: " << e.what() << "\n";
}
} else { } else {
std::cout << "Emitter test failed: " << name << "\n"; std::cout << "Emitter test failed: " << name << "\n";
std::cout << "Output:\n"; std::cout << "Output:\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment