File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,26 @@ TEST_CASE ("Testing String(const __FlashStringHelper) constructor() with invalid
101101 arduino::String str1 (F (buffer));
102102 REQUIRE (str1.compareTo (" Hello" ) == 0 );
103103}
104+
105+ TEST_CASE (" Testing String(StringSumHelper &&) constructor()" , " [String-Ctor-13]" )
106+ {
107+ arduino::String str (" Hello" );
108+ char const ch = ' !' ;
109+ arduino::String str1 (static_cast <arduino::StringSumHelper&&>(str+ch));
110+ REQUIRE (str1.compareTo (" Hello!" ) == 0 );
111+ }
112+
113+ TEST_CASE (" Testing String(String &&) constructor()" , " [String-Ctor-14]" )
114+ {
115+ arduino::String str (" Hello" );
116+ arduino::String str1 (static_cast <arduino::String&&>(str));
117+ REQUIRE (str1.compareTo (" Hello" ) == 0 );
118+ }
119+
120+ TEST_CASE (" Testing String(String &&) with move(String &rhs) to a valid buffer" , " [String-Ctor-15]" )
121+ {
122+ arduino::String str (" Hello" );
123+ arduino::String str1 (" Arduino" );
124+ str1 = static_cast <arduino::String&&>(str);
125+ REQUIRE (str1.compareTo (" Hello" ) == 0 );
126+ }
You can’t perform that action at this time.
0 commit comments