From aa6cf308dbf28a20ea597d9b6821828bbdeec661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Wed, 25 Jun 2014 13:31:05 +0200 Subject: [PATCH] Added a test that adds a nested array to an array --- JsonGeneratorTests/JsonArrayTests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/JsonGeneratorTests/JsonArrayTests.cpp b/JsonGeneratorTests/JsonArrayTests.cpp index b9916665..8b25593a 100644 --- a/JsonGeneratorTests/JsonArrayTests.cpp +++ b/JsonGeneratorTests/JsonArrayTests.cpp @@ -111,6 +111,16 @@ namespace JsonGeneratorTests AssertJsonIs("[[]]"); } + TEST_METHOD(AddOneNestedArrayWithOneItem) + { + JsonArray<1> nestedArray; + nestedArray.add(3.14); + + arr.add(nestedArray); + + AssertJsonIs("[[3.14]]"); + } + void AssertJsonIs(const char* expected) { char buffer[256];