Skip to content

Commit 3d30942

Browse files
committed
Add test code for String(StringSumHelper &&) constructor()
1 parent 5af3256 commit 3d30942

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/src/String/test_String.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,10 @@ 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&& str1 = "Hello";
108+
arduino::String str2(str1);
109+
REQUIRE(strcmp(str1.c_str(), str2.c_str()) == 0);
110+
}

0 commit comments

Comments
 (0)