Skip to content

Commit

Permalink
Add tests for remove_char
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Sep 12, 2024
1 parent 7d7680e commit 8f60f04
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 @@ -454,6 +454,13 @@ TEST_CASE("[String] Erasing") {
CHECK(s == "Josephine is such a girl!");
}

TEST_CASE("[String] remove_char") {
String s = "Banana";
CHECK(s.remove_char('a') == "Bnn");
CHECK(s.remove_char('\0') == "Banana");
CHECK(s.remove_char('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 8f60f04

Please sign in to comment.