Skip to content

Commit 7ea7280

Browse files
committed
Test String::String(String &&rval)
1 parent b2ef348 commit 7ea7280

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/src/String/test_String.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,12 @@ TEST_CASE ("Testing String(StringSumHelper &&) constructor()", "[String-Ctor-13]
107107
arduino::String&& str1 = "Hello";
108108
arduino::String str2(str1);
109109
REQUIRE(strcmp(str1.c_str(), str2.c_str()) == 0);
110+
}
111+
112+
TEST_CASE ("Testing String(String &&) constructor()", "[String-Ctor-14]")
113+
{
114+
arduino::String str("Hello");
115+
arduino::String str1(static_cast<arduino::String&&>(str));
116+
arduino::String str2 = str1;
117+
REQUIRE(str1.compareTo("Hello") == 0);
110118
}

0 commit comments

Comments
 (0)