Explorar o código

Added a test that adds a null in a hash table

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

+ 7 - 0
JsonGeneratorTests/JsonHashTableTests.cpp

@@ -44,6 +44,13 @@ namespace JsonGeneratorTests
             jsonIs("{\"pi\":3.14}");
         }
 
+        TEST_METHOD(OneNull)
+        {
+            add("key", (char*)0);
+
+            jsonIs("{\"key\":null}");
+        }
+
     private:
 
         template<typename T>