Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1891605

Browse files
committed
Add new test code for 'find' len higher than 'replace' len
1 parent411e44a commit1891605

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎test/src/String/test_replace.cpp‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ TEST_CASE ("Testing String::replace(String, String) when string constains subtr
5151
REQUIRE(strcmp(str.c_str(),"He11o Arduino!") ==0);
5252
}
5353

54-
TEST_CASE ("Testing String::replace(String, String) substr 'find' smaller than 'replace'","[String-replace-06]")
54+
TEST_CASE ("Testing String::replace(String, String) substr 'find' larger than 'replace'","[String-replace-06]")
55+
{
56+
arduino::Stringstr("Hello Arduino!");
57+
str.replace(arduino::String("llo"),arduino::String("11"));
58+
REQUIRE(strcmp(str.c_str(),"He11 Arduino!") ==0);
59+
}
60+
61+
TEST_CASE ("Testing String::replace(String, String) substr 'find' smaller than 'replace'","[String-replace-07]")
5562
{
5663
arduino::Stringstr("Hello Arduino!");
5764
str.replace(arduino::String("ll"),arduino::String("111"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp