From 1800a8e89edfc3874f387c332c511c6e9d04e643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Fri, 27 Jun 2014 13:49:03 +0200 Subject: [PATCH] Added a test of a nested hash table in an array --- JsonGeneratorTests/JsonArrayTests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/JsonGeneratorTests/JsonArrayTests.cpp b/JsonGeneratorTests/JsonArrayTests.cpp index 8c0c84ca..11ab0486 100644 --- a/JsonGeneratorTests/JsonArrayTests.cpp +++ b/JsonGeneratorTests/JsonArrayTests.cpp @@ -1,5 +1,6 @@ #include "CppUnitTest.h" #include "JsonArray.h" +#include "JsonHashTable.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; @@ -109,6 +110,15 @@ namespace JsonGeneratorTests jsonIs("[[]]"); } + TEST_METHOD(AddOneEmptyNestedHash) + { + JsonHashTable<1> nestedHash; + + addNested(nestedHash); + + jsonIs("[{}]"); + } + TEST_METHOD(AddOneNestedArrayWithOneItem) { JsonArray<1> nestedArray;