-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String: API must be fixed #8430
Comments
Notice that this is esp8266 & esp32 Core feature, ArduinoCore-API's String does not implement this and will fail with diff --git a/test/src/String/test_operators.cpp b/test/src/String/test_operators.cpp
index 67cb39b..e48fc4f 100644
--- a/test/src/String/test_operators.cpp
+++ b/test/src/String/test_operators.cpp
@@ -164,3 +164,10 @@ TEST_CASE ("Testing & String::operator = (StringSumHelper &&)", "[String-operato
str1 = static_cast<arduino::StringSumHelper&&>(str+ch);
REQUIRE(str1 == "Hello!");
}
+
+TEST_CASE ("Testing assignment operator")
+{
+ arduino::String str;
+ str = 12345;
+ REQUIRE(str == "12345");
+}
With 2.7.4, and earlier versions, this would've called
|
Restore the pre-3.0.0 behaviour when we could assign numeric values to the string object. After introducing operator =(char), everything was converted to char instead of the expected 'stringification' of the number (built-in int, long, unsigned int, unsigned long, long long, unsigned long long, float and double) Add toString() that handles conversions, re-use it through out the class Fix #8430
Restore the pre-3.0.0 behaviour when we could assign numeric values to the string object. After introducing operator =(char), everything was converted to char instead of the expected 'stringification' of the number (built-in int, long, unsigned int, unsigned long, long long, unsigned long long, float and double) Add toString() that handles conversions, re-use it through out the class Fix esp8266#8430
Per this comment,
String
API has changed since release 2.7.4 and should be fixed.(cc: @Ciapas-Linux)
The text was updated successfully, but these errors were encountered: