mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Rename addElement() to add()
				
					
				
			This commit is contained in:
		| @@ -9,7 +9,7 @@ using namespace ARDUINOJSON_NAMESPACE; | ||||
|  | ||||
| TEST_CASE("ElementProxy::add()") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|   doc.addElement(); | ||||
|   doc.add(); | ||||
|   ElementProxy<JsonDocument &> ep = doc[0]; | ||||
|  | ||||
|   SECTION("add(int)") { | ||||
| @@ -35,7 +35,7 @@ TEST_CASE("ElementProxy::add()") { | ||||
|  | ||||
| TEST_CASE("ElementProxy::clear()") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|   doc.addElement(); | ||||
|   doc.add(); | ||||
|   ElementProxy<JsonDocument &> ep = doc[0]; | ||||
|  | ||||
|   SECTION("size goes back to zero") { | ||||
| @@ -95,7 +95,7 @@ TEST_CASE("ElementProxy::operator==()") { | ||||
|  | ||||
| TEST_CASE("ElementProxy::remove()") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|   doc.addElement(); | ||||
|   doc.add(); | ||||
|   ElementProxy<JsonDocument &> ep = doc[0]; | ||||
|  | ||||
|   SECTION("remove(int)") { | ||||
| @@ -168,7 +168,7 @@ TEST_CASE("ElementProxy::set()") { | ||||
|  | ||||
| TEST_CASE("ElementProxy::size()") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|   doc.addElement(); | ||||
|   doc.add(); | ||||
|   ElementProxy<JsonDocument &> ep = doc[0]; | ||||
|  | ||||
|   SECTION("returns 0") { | ||||
| @@ -190,7 +190,7 @@ TEST_CASE("ElementProxy::size()") { | ||||
|  | ||||
| TEST_CASE("ElementProxy::memoryUsage()") { | ||||
|   DynamicJsonDocument doc(4096); | ||||
|   doc.addElement(); | ||||
|   doc.add(); | ||||
|   ElementProxy<JsonDocument &> ep = doc[0]; | ||||
|  | ||||
|   SECTION("returns 0 for null") { | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|  | ||||
| TEST_CASE("Compare JsonVariant with value") { | ||||
|   StaticJsonDocument<256> doc; | ||||
|   JsonVariant a = doc.addElement(); | ||||
|   JsonVariant a = doc.add(); | ||||
|  | ||||
|   SECTION("null vs (char*)0") { | ||||
|     char* b = 0; | ||||
| @@ -38,8 +38,8 @@ TEST_CASE("Compare JsonVariant with value") { | ||||
|  | ||||
| TEST_CASE("Compare JsonVariant with JsonVariant") { | ||||
|   StaticJsonDocument<256> doc; | ||||
|   JsonVariant a = doc.addElement(); | ||||
|   JsonVariant b = doc.addElement(); | ||||
|   JsonVariant a = doc.add(); | ||||
|   JsonVariant b = doc.add(); | ||||
|  | ||||
|   SECTION("'abc' vs 'abc'") { | ||||
|     a.set("abc"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user