summaryrefslogtreecommitdiffstats
path: root/tests/core/string/test_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/string/test_string.h')
-rw-r--r--tests/core/string/test_string.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index abe9f78ccc..7c76e7aa7b 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -395,6 +395,12 @@ TEST_CASE("[String] Insertion") {
CHECK(s == "Who is Frederic Chopin?");
}
+TEST_CASE("[String] Erasing") {
+ String s = "Josephine is such a cute girl!";
+ s = s.erase(s.find("cute "), String("cute ").length());
+ CHECK(s == "Josephine is such a girl!");
+}
+
TEST_CASE("[String] Number to string") {
CHECK(String::num(0) == "0");
CHECK(String::num(0.0) == "0"); // No trailing zeros.