mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Replaced direct emitter writing with an accessor to a C-string
This commit is contained in:
@@ -101,16 +101,15 @@ namespace Test
|
||||
YAML::Emitter out;
|
||||
std::string desiredOutput;
|
||||
test(out, desiredOutput);
|
||||
std::stringstream output;
|
||||
out.WriteToStream(output);
|
||||
std::string output = out.c_str();
|
||||
|
||||
if(output.str() == desiredOutput) {
|
||||
if(output == desiredOutput) {
|
||||
std::cout << "Test passed: " << name << "\n";
|
||||
} else {
|
||||
passed = false;
|
||||
std::cout << "Test failed: " << name << "\n";
|
||||
std::cout << "Output:\n";
|
||||
std::cout << output.str() << "<<<\n";
|
||||
std::cout << output << "<<<\n";
|
||||
std::cout << "Desired output:\n";
|
||||
std::cout << desiredOutput << "<<<\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user