mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 03:20:15 +01:00
Improve coverage for Writer and PrettyWriter
This commit is contained in:
@@ -80,6 +80,15 @@ TEST(PrettyWriter, SetIndent) {
|
||||
buffer.GetString());
|
||||
}
|
||||
|
||||
TEST(PrettyWriter, String) {
|
||||
StringBuffer buffer;
|
||||
PrettyWriter<StringBuffer> writer(buffer);
|
||||
EXPECT_TRUE(writer.StartArray());
|
||||
EXPECT_TRUE(writer.String("Hello\n"));
|
||||
EXPECT_TRUE(writer.EndArray());
|
||||
EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString());
|
||||
}
|
||||
|
||||
#if RAPIDJSON_HAS_STDSTRING
|
||||
TEST(PrettyWriter, String_STDSTRING) {
|
||||
StringBuffer buffer;
|
||||
|
||||
Reference in New Issue
Block a user