@@ -99,4 +99,58 @@ TEST_CASE ("Testing String::operator + (const __FlashStringHelper *)", "[String-
9999 arduino::Stringstr1 (" Hello" );
100100 arduino::Stringstr (" Hello Arduino" );
101101REQUIRE (str.compareTo (str1+F (" Arduino" )) ==0 );
102+ }
103+
104+ TEST_CASE (" Testing & String::operator = (StringSumHelper &&rval)" ," [String-operator+-12]" )
105+ {
106+ arduino::Stringstr1 (" Hello" );
107+ arduino::String str = (str1+" Arduino" );
108+ REQUIRE (str.compareTo (" Hello Arduino" ) ==0 );
109+ }
110+
111+ TEST_CASE (" Testing & String::operator = (const String &) with invalid buffer of second string" ," [String-operator+-13]" )
112+ {
113+ arduino::Stringstr1 (" Hello" );
114+
115+ char *buffer2 =NULL ;
116+ arduino::Stringstr2 (buffer2);
117+
118+ str1 = str2;
119+ REQUIRE (str1.compareTo (str2) ==0 );
120+ }
121+
122+ TEST_CASE (" Testing & String::operator = (const char *)" ," [String-operator+-14]" )
123+ {
124+ char *buffer =NULL ;
125+ arduino::Stringstr (" Hello" );
126+ str = buffer;
127+ REQUIRE (str.compareTo (" Hello" ) ==0 );
128+ }
129+
130+ TEST_CASE (" Testing & String::operator = (const String &) with invalid buffer of first string" ," [String-operator+-15]" )
131+ {
132+ char *buffer1 =NULL ;
133+ arduino::Stringstr1 (buffer1);
134+
135+ arduino::Stringstr2 (" Hello" );
136+
137+ str1 = str2;
138+ REQUIRE (str1.compareTo (str2) ==0 );
139+ }
140+
141+ TEST_CASE (" Testing & String::operator = (String &&)" ," [String-operator+-16]" )
142+ {
143+ arduino::Stringstr (" Hello" );
144+ arduino::Stringstr1 (" Arduino" );
145+ str1 =static_cast <arduino::String&&>(str);
146+ REQUIRE (str1.compareTo (" Hello" ) ==0 );
147+ }
148+
149+ TEST_CASE (" Testing & String::operator = (StringSumHelper &&)" ," [String-operator+-17]" )
150+ {
151+ arduino::Stringstr (" Hello" );
152+ char const ch =' !' ;
153+ arduino::Stringstr1 (" Arduino" );
154+ str1 =static_cast <arduino::StringSumHelper&&>(str+ch);
155+ REQUIRE (str1.compareTo (" Hello!" ) ==0 );
102156}