mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Added a test with two strings in a hash table
This commit is contained in:
		| @@ -15,21 +15,21 @@ namespace JsonGeneratorTests | ||||
|             jsonIs("[]"); | ||||
|         } | ||||
|  | ||||
|         TEST_METHOD(AddNull) | ||||
|         TEST_METHOD(Null) | ||||
|         { | ||||
|             addValue((char*)0); | ||||
|  | ||||
|             jsonIs("[null]"); | ||||
|         } | ||||
|  | ||||
|         TEST_METHOD(AddOneString) | ||||
|         TEST_METHOD(OneString) | ||||
|         { | ||||
|             addValue("hello"); | ||||
|  | ||||
|             jsonIs("[\"hello\"]"); | ||||
|         } | ||||
|  | ||||
|         TEST_METHOD(AddTwoStrings) | ||||
|         TEST_METHOD(TwoStrings) | ||||
|         { | ||||
|             addValue("hello"); | ||||
|             addValue("world"); | ||||
|   | ||||
| @@ -22,6 +22,13 @@ namespace JsonGeneratorTests | ||||
|             jsonIs("{\"key\":\"value\"}"); | ||||
|         } | ||||
|  | ||||
|         TEST_METHOD(TwoStrings) | ||||
|         { | ||||
|             add("key1", "value1"); | ||||
|             add("key2", "value2");  | ||||
|             jsonIs("{\"key1\":\"value1\",\"key2\":\"value2\"}"); | ||||
|         } | ||||
|  | ||||
|     private: | ||||
|  | ||||
|         template<typename T> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user