From 4e350e58086903fbf98e904f4cedbf991fd04fef Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Wed, 11 Jan 2012 17:06:27 -0600 Subject: [PATCH] Removed some extra stuff in the comment/newline in flow map tests, which really should be illegal (since implicit keys can't span multiple lines). It would be impossible to fix if we keep the immediate-output we're doing now - the only way to prevent it would be to hold on to a key's text until we got to the value token to make sure it could be an implicit key --- test/emittertests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/emittertests.cpp b/test/emittertests.cpp index d21ac68..26e0119 100644 --- a/test/emittertests.cpp +++ b/test/emittertests.cpp @@ -545,12 +545,12 @@ namespace Test void CommentInFlowMap(YAML::Emitter& out, std::string& desiredOutput) { out << YAML::Flow << YAML::BeginMap; - out << YAML::Key << "foo" << YAML::Comment("foo!") << YAML::Value << "foo value"; + out << YAML::Key << "foo" << YAML::Value << "foo value"; out << YAML::Key << "bar" << YAML::Value << "bar value" << YAML::Comment("bar!"); - out << YAML::Key << "baz" << YAML::Comment("baz!") << YAML::Value << "baz value" << YAML::Comment("baz!"); + out << YAML::Key << "baz" << YAML::Value << "baz value" << YAML::Comment("baz!"); out << YAML::EndMap; - desiredOutput = "{foo # foo!\n: foo value, bar: bar value # bar!\n, baz # baz!\n: baz value # baz!\n}"; + desiredOutput = "{foo: foo value, bar: bar value # bar!\n, baz: baz value # baz!\n}"; } void Indentation(YAML::Emitter& out, std::string& desiredOutput) @@ -737,9 +737,9 @@ namespace Test { out << YAML::Flow << YAML::BeginMap; out << YAML::Key << "a" << YAML::Value << "foo" << YAML::Newline; - out << YAML::Key << "b" << YAML::Newline << YAML::Value << "bar"; + out << YAML::Key << "b" << YAML::Value << "bar"; out << YAML::EndMap; - desiredOutput = "{a: foo\n, b\n: bar}"; + desiredOutput = "{a: foo\n, b: bar}"; } void LotsOfNewlines(YAML::Emitter& out, std::string& desiredOutput)