Skip to content

Commit 3fc9299

Browse files
committed
Add simple test for issue Tencent#1336
1 parent 11defb7 commit 3fc9299

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/unittest/prettywritertest.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,17 @@ TEST(PrettyWriter, MoveCtor) {
339339
}
340340
#endif
341341

342+
TEST(PrettyWriter, Issue_1336) {
343+
char buf[100] = "Hello";
344+
345+
StringBuffer buffer;
346+
PrettyWriter<StringBuffer> writer(buffer);
347+
writer.String(buf);
348+
349+
EXPECT_STREQ("\"Hello\"", buffer.GetString());
350+
EXPECT_TRUE(writer.IsComplete()); \
351+
}
352+
342353
#ifdef __clang__
343354
RAPIDJSON_DIAG_POP
344355
#endif

0 commit comments

Comments
 (0)