Skip to content

Commit 8ad3bde

Browse files
committed
Add test case to invalidate & String::operator = (const char *cstr)
1 parent f7e3241 commit 8ad3bde

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: test/src/String/test_operators.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,12 @@ TEST_CASE ("Testing & String::operator = (const String &)", "[String-operator+-1
136136
arduino::String str = (str1+ch);
137137
REQUIRE(str.compareTo("Hello!") == 0);
138138
*/
139+
}
140+
141+
TEST_CASE ("Testing & String::operator = (const char *)", "[String-operator+-14]")
142+
{
143+
char *buffer = NULL;
144+
arduino::String str("Hello");
145+
str = buffer;
146+
REQUIRE(str.compareTo("Hello") == 0);
139147
}

0 commit comments

Comments
 (0)