Add simple test for issue #1336

This commit is contained in:
Lele Gaifax 2018-08-03 12:34:03 +02:00
parent 11defb7aa4
commit 3fc9299b84

View File

@ -339,6 +339,17 @@ TEST(PrettyWriter, MoveCtor) {
} }
#endif #endif
TEST(PrettyWriter, Issue_1336) {
char buf[100] = "Hello";
StringBuffer buffer;
PrettyWriter<StringBuffer> writer(buffer);
writer.String(buf);
EXPECT_STREQ("\"Hello\"", buffer.GetString());
EXPECT_TRUE(writer.IsComplete()); \
}
#ifdef __clang__ #ifdef __clang__
RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_POP
#endif #endif