Commit ad275901 authored by Jesse Beder's avatar Jesse Beder
Browse files

Switched single quoted test to positive test (since we just convert to double quoted)

parent a6fe313d
...@@ -938,7 +938,14 @@ namespace Test ...@@ -938,7 +938,14 @@ namespace Test
" intelligence: 56"; " intelligence: 56";
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////// void ForceSingleQuotedToDouble(YAML::Emitter& out, std::string& desiredOutput)
{
out << YAML::SingleQuoted << "Hello\nWorld";
desiredOutput = "Hello\\nWorld";
}
////////////////////////////////////////////////////////////////////////////////
// incorrect emitting // incorrect emitting
void ExtraEndSeq(YAML::Emitter& out, std::string& desiredError) void ExtraEndSeq(YAML::Emitter& out, std::string& desiredError)
...@@ -962,13 +969,6 @@ namespace Test ...@@ -962,13 +969,6 @@ namespace Test
out << YAML::EndMap; out << YAML::EndMap;
} }
void BadSingleQuoted(YAML::Emitter& out, std::string& desiredError)
{
desiredError = YAML::ErrorMsg::SINGLE_QUOTED_CHAR;
out << YAML::SingleQuoted << "Hello\nWorld";
}
void InvalidAnchor(YAML::Emitter& out, std::string& desiredError) void InvalidAnchor(YAML::Emitter& out, std::string& desiredError)
{ {
desiredError = YAML::ErrorMsg::INVALID_ANCHOR; desiredError = YAML::ErrorMsg::INVALID_ANCHOR;
...@@ -1135,10 +1135,10 @@ namespace Test ...@@ -1135,10 +1135,10 @@ namespace Test
RunEmitterTest(&Emitter::DashInBlockContext, "dash in block context", passed, total); RunEmitterTest(&Emitter::DashInBlockContext, "dash in block context", passed, total);
RunEmitterTest(&Emitter::HexAndOct, "hex and oct", passed, total); RunEmitterTest(&Emitter::HexAndOct, "hex and oct", passed, total);
RunEmitterTest(&Emitter::CompactMapWithNewline, "compact map with newline", passed, total); RunEmitterTest(&Emitter::CompactMapWithNewline, "compact map with newline", passed, total);
RunEmitterTest(&Emitter::ForceSingleQuotedToDouble, "force single quoted to double", passed, total);
RunEmitterErrorTest(&Emitter::ExtraEndSeq, "extra EndSeq", passed, total); RunEmitterErrorTest(&Emitter::ExtraEndSeq, "extra EndSeq", passed, total);
RunEmitterErrorTest(&Emitter::ExtraEndMap, "extra EndMap", passed, total); RunEmitterErrorTest(&Emitter::ExtraEndMap, "extra EndMap", passed, total);
RunEmitterErrorTest(&Emitter::BadSingleQuoted, "bad single quoted string", passed, total);
RunEmitterErrorTest(&Emitter::InvalidAnchor, "invalid anchor", passed, total); RunEmitterErrorTest(&Emitter::InvalidAnchor, "invalid anchor", passed, total);
RunEmitterErrorTest(&Emitter::InvalidAlias, "invalid alias", passed, total); RunEmitterErrorTest(&Emitter::InvalidAlias, "invalid alias", passed, total);
RunEmitterErrorTest(&Emitter::BadLocalTag, "bad local tag", passed, total); RunEmitterErrorTest(&Emitter::BadLocalTag, "bad local tag", passed, total);
......
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