Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Aug 28, 2024
1 parent 2ffa552 commit 349ff31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/core/string/test_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,13 @@ TEST_CASE("[String] Erasing") {
CHECK(s == "Josephine is such a girl!");
}

TEST_CASE("[String] remove_string") {
String s = "Banana";
MULTICHECK_STRING_EQ(s, remove_string, "an", "Ba");
MULTICHECK_STRING_EQ(s, remove_string, "", "Banana");
MULTICHECK_STRING_EQ(s, remove_string, "x", "Banana");
}

TEST_CASE("[String] Number to string") {
CHECK(String::num(0) == "0");
CHECK(String::num(0.0) == "0"); // No trailing zeros.
Expand Down

0 comments on commit 349ff31

Please sign in to comment.