mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Renamed private method
This commit is contained in:
		| @@ -15,7 +15,7 @@ namespace JsonGeneratorTests | ||||
|          | ||||
|         TEST_METHOD(Empty) | ||||
|         { | ||||
|             returns(2); | ||||
|             returnValueIs(2); | ||||
|             jsonIs("[]"); | ||||
|         } | ||||
|  | ||||
| @@ -23,7 +23,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue((char*)0); | ||||
|  | ||||
|             returns(6); | ||||
|             returnValueIs(6); | ||||
|             jsonIs("[null]"); | ||||
|         } | ||||
|  | ||||
| @@ -31,7 +31,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("hello"); | ||||
|  | ||||
|             returns(9); | ||||
|             returnValueIs(9); | ||||
|             jsonIs("[\"hello\"]"); | ||||
|         } | ||||
|  | ||||
| @@ -40,7 +40,7 @@ namespace JsonGeneratorTests | ||||
|             addValue("hello"); | ||||
|             addValue("world"); | ||||
|  | ||||
|             returns(17); | ||||
|             returnValueIs(17); | ||||
|             jsonIs("[\"hello\",\"world\"]"); | ||||
|         } | ||||
|  | ||||
| @@ -50,7 +50,7 @@ namespace JsonGeneratorTests | ||||
|             addValue("world"); | ||||
|             addValue("lost"); | ||||
|  | ||||
|             returns(17); | ||||
|             returnValueIs(17); | ||||
|             jsonIs("[\"hello\",\"world\"]"); | ||||
|         } | ||||
|  | ||||
| @@ -58,7 +58,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue(3.14); | ||||
|  | ||||
|             returns(6); | ||||
|             returnValueIs(6); | ||||
|             jsonIs("[3.14]"); | ||||
|         } | ||||
|  | ||||
| @@ -67,7 +67,7 @@ namespace JsonGeneratorTests | ||||
|             addValue(3.14); | ||||
|             addValue(2.72); | ||||
|  | ||||
|             returns(11); | ||||
|             returnValueIs(11); | ||||
|             jsonIs("[3.14,2.72]"); | ||||
|         } | ||||
|  | ||||
| @@ -77,7 +77,7 @@ namespace JsonGeneratorTests | ||||
|             addValue(2.72); | ||||
|             addValue(1.41); | ||||
|  | ||||
|             returns(11); | ||||
|             returnValueIs(11); | ||||
|             jsonIs("[3.14,2.72]"); | ||||
|         } | ||||
|  | ||||
| @@ -85,7 +85,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue(true); | ||||
|  | ||||
|             returns(6); | ||||
|             returnValueIs(6); | ||||
|             jsonIs("[true]"); | ||||
|         } | ||||
|  | ||||
| @@ -93,7 +93,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue(false); | ||||
|  | ||||
|             returns(7); | ||||
|             returnValueIs(7); | ||||
|             jsonIs("[false]"); | ||||
|         } | ||||
|  | ||||
| @@ -102,7 +102,7 @@ namespace JsonGeneratorTests | ||||
|             addValue(false); | ||||
|             addValue(true); | ||||
|  | ||||
|             returns(12); | ||||
|             returnValueIs(12); | ||||
|             jsonIs("[false,true]"); | ||||
|         } | ||||
|  | ||||
| @@ -112,7 +112,7 @@ namespace JsonGeneratorTests | ||||
|             addValue(true); | ||||
|             addValue(false); | ||||
|  | ||||
|             returns(12); | ||||
|             returnValueIs(12); | ||||
|             jsonIs("[false,true]"); | ||||
|         } | ||||
|  | ||||
| @@ -122,7 +122,7 @@ namespace JsonGeneratorTests | ||||
|              | ||||
|             addNested(nestedArray); | ||||
|  | ||||
|             returns(4); | ||||
|             returnValueIs(4); | ||||
|             jsonIs("[[]]"); | ||||
|         } | ||||
|  | ||||
| @@ -132,7 +132,7 @@ namespace JsonGeneratorTests | ||||
|  | ||||
|             addNested(nestedHash); | ||||
|  | ||||
|             returns(4); | ||||
|             returnValueIs(4); | ||||
|             jsonIs("[{}]"); | ||||
|         } | ||||
|  | ||||
| @@ -143,7 +143,7 @@ namespace JsonGeneratorTests | ||||
|  | ||||
|             addNested(nestedArray); | ||||
|  | ||||
|             returns(8); | ||||
|             returnValueIs(8); | ||||
|             jsonIs("[[3.14]]"); | ||||
|         } | ||||
|  | ||||
| @@ -166,7 +166,7 @@ namespace JsonGeneratorTests | ||||
|             Assert::AreEqual(expected, buffer); | ||||
|         } | ||||
|  | ||||
|         void returns(size_t expected) | ||||
|         void returnValueIs(size_t expected) | ||||
|         { | ||||
|             size_t actual = arr.printTo(buffer, sizeof(buffer)); | ||||
|             Assert::AreEqual(expected, actual); | ||||
|   | ||||
| @@ -15,7 +15,7 @@ namespace JsonGeneratorTests | ||||
|          | ||||
|         TEST_METHOD(Empty) | ||||
|         { | ||||
|             returns(2); | ||||
|             returnValueIs(2); | ||||
|             jsonIs("{}"); | ||||
|         } | ||||
|  | ||||
| @@ -23,7 +23,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("key", "value"); | ||||
|  | ||||
|             returns(15); | ||||
|             returnValueIs(15); | ||||
|             jsonIs("{\"key\":\"value\"}"); | ||||
|         } | ||||
|  | ||||
| @@ -32,7 +32,7 @@ namespace JsonGeneratorTests | ||||
|             addValue("key1", "value1"); | ||||
|             addValue("key2", "value2"); | ||||
|  | ||||
|             returns(33); | ||||
|             returnValueIs(33); | ||||
|             jsonIs("{\"key1\":\"value1\",\"key2\":\"value2\"}"); | ||||
|         } | ||||
|  | ||||
| @@ -42,7 +42,7 @@ namespace JsonGeneratorTests | ||||
|             addValue("key2", "value2"); | ||||
|             addValue("key3", "value3"); | ||||
|  | ||||
|             returns(33); | ||||
|             returnValueIs(33); | ||||
|             jsonIs("{\"key1\":\"value1\",\"key2\":\"value2\"}"); | ||||
|         } | ||||
|  | ||||
| @@ -50,7 +50,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("pi", 3.14); | ||||
|  | ||||
|             returns(11); | ||||
|             returnValueIs(11); | ||||
|             jsonIs("{\"pi\":3.14}"); | ||||
|         } | ||||
|  | ||||
| @@ -58,7 +58,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("key", (char*) 0); | ||||
|  | ||||
|             returns(12); | ||||
|             returnValueIs(12); | ||||
|             jsonIs("{\"key\":null}"); | ||||
|         } | ||||
|  | ||||
| @@ -66,7 +66,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("key", true); | ||||
|  | ||||
|             returns(12); | ||||
|             returnValueIs(12); | ||||
|             jsonIs("{\"key\":true}"); | ||||
|         } | ||||
|  | ||||
| @@ -74,7 +74,7 @@ namespace JsonGeneratorTests | ||||
|         { | ||||
|             addValue("key", false); | ||||
|  | ||||
|             returns(13); | ||||
|             returnValueIs(13); | ||||
|             jsonIs("{\"key\":false}"); | ||||
|         } | ||||
|  | ||||
| @@ -83,7 +83,7 @@ namespace JsonGeneratorTests | ||||
|             JsonArray<1> nestedArray; | ||||
|             addNested("key", nestedArray); | ||||
|  | ||||
|             returns(10); | ||||
|             returnValueIs(10); | ||||
|             jsonIs("{\"key\":[]}"); | ||||
|         } | ||||
|  | ||||
| @@ -92,7 +92,7 @@ namespace JsonGeneratorTests | ||||
|             JsonHashTable<1> nestedHash; | ||||
|             addNested("key", nestedHash); | ||||
|  | ||||
|             returns(10); | ||||
|             returnValueIs(10); | ||||
|             jsonIs("{\"key\":{}}"); | ||||
|         } | ||||
|  | ||||
| @@ -115,7 +115,7 @@ namespace JsonGeneratorTests | ||||
|             Assert::AreEqual(expected, buffer); | ||||
|         } | ||||
|  | ||||
|         void returns(size_t expected) | ||||
|         void returnValueIs(size_t expected) | ||||
|         { | ||||
|             size_t actual = hash.printTo(buffer, sizeof(buffer)); | ||||
|             Assert::AreEqual(expected, actual); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user