Răsfoiți Sursa

Added a test that adds a null in a hash table

Benoît Blanchon 11 ani în urmă
părinte
comite
495efd8629
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  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>