Force null to be quoted if written as a string

This commit is contained in:
Jesse Beder
2015-01-24 16:07:10 -06:00
parent 087e0673f3
commit bc86fd4aec
2 changed files with 80 additions and 41 deletions

View File

@@ -956,6 +956,12 @@ TEST_F(EmitterTest, ForceSingleQuotedToDouble) {
ExpectEmit("\"Hello\\nWorld\"");
}
TEST_F(EmitterTest, QuoteNull) {
out << "null";
ExpectEmit("\"null\"");
}
class EmitterErrorTest : public ::testing::Test {
protected:
void ExpectEmitError(const std::string& expectedError) {