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 Jul 17, 2024
1 parent 6cb7f5e commit a57b76c
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 @@ -448,6 +448,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 a57b76c

Please sign in to comment.