From 10068e7b228c2f9e47b39647a7e49f59aa839977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Mon, 30 Jun 2014 12:48:55 +0200 Subject: [PATCH] Added a test of an empty hash table in a hash table --- JsonGeneratorTests/JsonHashTableTests.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/JsonGeneratorTests/JsonHashTableTests.cpp b/JsonGeneratorTests/JsonHashTableTests.cpp index a1630042..66d85255 100644 --- a/JsonGeneratorTests/JsonHashTableTests.cpp +++ b/JsonGeneratorTests/JsonHashTableTests.cpp @@ -66,7 +66,7 @@ namespace JsonGeneratorTests jsonIs("{\"key\":false}"); } - TEST_METHOD(AddOneEmptyNestedArray) + TEST_METHOD(OneEmptyNestedArray) { JsonArray<1> nestedArray; @@ -75,6 +75,15 @@ namespace JsonGeneratorTests jsonIs("{\"key\":[]}"); } + TEST_METHOD(OneEmptyNestedHash) + { + JsonHashTable<1> nestedHash; + + addNested("key", nestedHash); + + jsonIs("{\"key\":{}}"); + } + private: void addNested(const char* key, JsonObjectBase& value)