mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fix call of overloaded 'String(const char*, int)' is ambiguous
				
					
				
			This commit is contained in:
		| @@ -136,7 +136,7 @@ TEST_CASE("JsonVariant::as()") { | ||||
|  | ||||
|     REQUIRE(variant.as<long>() == 42L); | ||||
|     REQUIRE(variant.as<JsonString>() == "42"); | ||||
|     REQUIRE(variant.as<JsonString>().isStatic() == true); | ||||
|     REQUIRE(variant.as<JsonString>().isLinked() == true); | ||||
|   } | ||||
|  | ||||
|   SECTION("set(\"hello\")") { | ||||
| @@ -159,7 +159,7 @@ TEST_CASE("JsonVariant::as()") { | ||||
|     REQUIRE(variant.as<const char*>() == std::string("4.2")); | ||||
|     REQUIRE(variant.as<std::string>() == std::string("4.2")); | ||||
|     REQUIRE(variant.as<JsonString>() == "4.2"); | ||||
|     REQUIRE(variant.as<JsonString>().isStatic() == false); | ||||
|     REQUIRE(variant.as<JsonString>().isLinked() == false); | ||||
|   } | ||||
|  | ||||
|   SECTION("set(\"true\")") { | ||||
|   | ||||
| @@ -98,7 +98,7 @@ TEST_CASE("JsonVariant::set() when there is enough memory") { | ||||
|     char str[16]; | ||||
|  | ||||
|     strcpy(str, "hello"); | ||||
|     bool result = variant.set(JsonString(str, true)); | ||||
|     bool result = variant.set(JsonString(str, JsonString::Linked)); | ||||
|     strcpy(str, "world"); | ||||
|  | ||||
|     REQUIRE(result == true); | ||||
| @@ -109,7 +109,7 @@ TEST_CASE("JsonVariant::set() when there is enough memory") { | ||||
|     char str[16]; | ||||
|  | ||||
|     strcpy(str, "hello"); | ||||
|     bool result = variant.set(JsonString(str, false)); | ||||
|     bool result = variant.set(JsonString(str, JsonString::Copied)); | ||||
|     strcpy(str, "world"); | ||||
|  | ||||
|     REQUIRE(result == true); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user