mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Added a test with 3 strings
This commit is contained in:
		| @@ -43,5 +43,21 @@ namespace JsonParserTests | ||||
|                 Assert::AreEqual(expected[index++], i); | ||||
|             } | ||||
| 		} | ||||
|  | ||||
|         TEST_METHOD(ThreeStrings) | ||||
|         { | ||||
|             char json[] = "[\"1\",\"2\",\"3\"]"; | ||||
|             char* expected[] = { "1", "2", "3" }; | ||||
|             JsonParser<4> parser; | ||||
|  | ||||
|             JsonArray a = parser.parse(json); | ||||
|  | ||||
|             int index = 0; | ||||
|  | ||||
|             for (const char* i : a) | ||||
|             { | ||||
|                 Assert::AreEqual(expected[index++], i); | ||||
|             } | ||||
|         } | ||||
| 	}; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user