Added RawJson() to insert pregenerated JSON portions (issue #259)

This commit is contained in:
Benoit Blanchon
2016-04-16 16:15:01 +02:00
parent c77c3f33ef
commit a6724bd03f
11 changed files with 131 additions and 130 deletions

View File

@ -96,6 +96,12 @@ TEST_F(JsonArray_PrintTo_Tests, TwoIntegers) {
outputMustBe("[1,2]");
}
TEST_F(JsonArray_PrintTo_Tests, RawJson) {
array.add(RawJson("{\"key\":\"value\"}"));
outputMustBe("[{\"key\":\"value\"}]");
}
TEST_F(JsonArray_PrintTo_Tests, OneIntegerOverCapacity) {
array.add(1);
array.add(2);