Explorar o código

Added a test of a nested hash table in an array

Benoît Blanchon %!s(int64=11) %!d(string=hai) anos
pai
achega
1800a8e89e
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      JsonGeneratorTests/JsonArrayTests.cpp

+ 10 - 0
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;