mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +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}"); |             jsonIs("{\"key\":false}"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         TEST_METHOD(AddOneEmptyNestedArray) |         TEST_METHOD(OneEmptyNestedArray) | ||||||
|         { |         { | ||||||
|             JsonArray<1> nestedArray; |             JsonArray<1> nestedArray; | ||||||
|  |  | ||||||
| @@ -75,6 +75,15 @@ namespace JsonGeneratorTests | |||||||
|             jsonIs("{\"key\":[]}"); |             jsonIs("{\"key\":[]}"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         TEST_METHOD(OneEmptyNestedHash) | ||||||
|  |         { | ||||||
|  |             JsonHashTable<1> nestedHash; | ||||||
|  |  | ||||||
|  |             addNested("key", nestedHash); | ||||||
|  |  | ||||||
|  |             jsonIs("{\"key\":{}}"); | ||||||
|  |         } | ||||||
|  |  | ||||||
|     private: |     private: | ||||||
|          |          | ||||||
|         void addNested(const char* key, JsonObjectBase& value) |         void addNested(const char* key, JsonObjectBase& value) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user