@@ -121,15 +121,23 @@ TEST_CASE ("Testing & String::operator = (const String &) with invalid buffer of
121121REQUIRE (str1.compareTo (str2) ==0 );
122122}
123123
124- TEST_CASE (" Testing & String::operator = (const char *)" ," [String-operator+-14]" )
124+ TEST_CASE (" Testing & String::operator = (const char *) with NULL does not leave string unchanged " ," [String-operator+-14]" )
125125{
126126char *buffer =NULL ;
127127 arduino::Stringstr (" Hello" );
128128 str = buffer;
129129REQUIRE (str.compareTo (" Hello" ) !=0 );
130130}
131131
132- TEST_CASE (" Testing & String::operator = (const String &) with invalid buffer of first string" ," [String-operator+-15]" )
132+ TEST_CASE (" Testing & String::operator = (const char *) with NULL produces invalid string" ," [String-operator+-14]" )
133+ {
134+ char *buffer =NULL ;
135+ arduino::Stringstr (" Hello" );
136+ str = buffer;
137+ REQUIRE_FALSE (str);
138+ }
139+
140+ TEST_CASE (" Testing & String::operator = (const String &) on invalid String updates it" ," [String-operator+-15]" )
133141{
134142char *buffer1 =NULL ;
135143 arduino::Stringstr1 (buffer1);
@@ -140,6 +148,17 @@ TEST_CASE ("Testing & String::operator = (const String &) with invalid buffer of
140148REQUIRE (str1.compareTo (str2) ==0 );
141149}
142150
151+ TEST_CASE (" Testing & String::operator = (const String &) on invalid String makes it valid" ," [String-operator+-15]" )
152+ {
153+ char *buffer1 =NULL ;
154+ arduino::Stringstr1 (buffer1);
155+
156+ arduino::Stringstr2 (" Hello" );
157+
158+ str1 = str2;
159+ REQUIRE (str1);
160+ }
161+
143162TEST_CASE (" Testing & String::operator = (String &&)" ," [String-operator+-16]" )
144163{
145164 arduino::Stringstr (" Hello" );