Skip to content

Commit 9cf53db

Browse files
committed
Template: Add test for empty string
1 parent e1acf78 commit 9cf53db

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/lib/tests.cc

+12-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,20 @@
1010
#include <StubLib/lib.hh>
1111

1212
TEST_CASE("stub lib", "[lib]") {
13-
std::string testString = "test_string";
1413

15-
SECTION("capitalize works") {
14+
SECTION("capitalize string") {
15+
std::string testString = "test_string";
16+
1617
lib::Lib::capitalize(testString);
18+
1719
REQUIRE(testString == "TEST_STRING");
1820
}
21+
22+
SECTION("empty string") {
23+
std::string testString;
24+
25+
lib::Lib::capitalize(testString);
26+
27+
REQUIRE(testString.empty());
28+
}
1929
}

0 commit comments

Comments
 (0)