Skip to content

Simplify string comparisons in tests and fix bug in String::compareTo #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix whitespace issues in testcases
This adds a newline at the end of the file, which is helpful for git
diff display.
  • Loading branch information
matthijskooijman committed Dec 31, 2020
commit 3caa0394c31f875a98ce0c73c520b66d66fb9e12
2 changes: 1 addition & 1 deletion test/src/String/test_comparisonFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ TEST_CASE ("Testing String::endsWith(const String &)", "[String-endsWith-10]")
arduino::String str2("Helo");
REQUIRE(str1.endsWith(str2) == 0);
}
}
}
2 changes: 1 addition & 1 deletion test/src/String/test_concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ TEST_CASE ("Testing String::concat(const __FlashStringHelper *)", "[String-conca
arduino::String str1("Hello");
REQUIRE(str1.concat(F(" Arduino")) == 1);
REQUIRE(strcmp(str1.c_str(), "Hello Arduino") == 0);
}
}
2 changes: 1 addition & 1 deletion test/src/String/test_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ TEST_CASE ("Testing & String::operator = (StringSumHelper &&)", "[String-operato
arduino::String str1("Arduino");
str1 = static_cast<arduino::StringSumHelper&&>(str+ch);
REQUIRE(str1.compareTo("Hello!") == 0);
}
}
2 changes: 1 addition & 1 deletion test/src/String/test_substring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ TEST_CASE ("Testing String::substring(unsigned int, unsigned int)", "[String-sub
arduino::String str2("ello");
REQUIRE(str2.compareTo(str1.substring(9,1)) == 0);
}
}
}