Skip to content

Commit

Permalink
Add tests for remove_chars
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Sep 12, 2024
1 parent 8f60f04 commit de7f94f
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 @@ -461,6 +461,13 @@ TEST_CASE("[String] remove_char") {
CHECK(s.remove_char('x') == "Banana");
}

TEST_CASE("[String] remove_chars") {
String s = "Banana";
CHECK(s.remove_chars({ 'B', 'a' }) == "nn");
CHECK(s.remove_chars({}) == "Banana");
CHECK(s.remove_chars({ 'x', 'y' }) == "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 de7f94f

Please sign in to comment.