mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Added a test of an empty hash table in a hash table
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user