summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-08-16 16:53:40 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-08-16 16:53:40 +0200
commit20e24bd2bb033d3fe019bd2a1a8c4f1590c1399b (patch)
treedeba7be1213d13ea6fc63c4874fd35178638ce0e /tests
parent3518a30674afed7d1e69fb260e7826eb9eda0a7f (diff)
parent230385b5875643c2e162e6c4d2a27aaef95e1cc8 (diff)
downloadredot-engine-20e24bd2bb033d3fe019bd2a1a8c4f1590c1399b.tar.gz
Merge pull request #78529 from Chaosus/string_reverse
Add `String.reverse` method
Diffstat (limited to 'tests')
-rw-r--r--tests/core/string/test_string.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index fc1e0590fc..659fb003d3 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -1609,6 +1609,11 @@ TEST_CASE("[String] Repeat") {
CHECK(t == s);
}
+TEST_CASE("[String] Reverse") {
+ String s = "Abcd";
+ CHECK(s.reverse() == "dcbA");
+}
+
TEST_CASE("[String] SHA1/SHA256/MD5") {
String s = "Godot";
String sha1 = "a1e91f39b9fce6a9998b14bdbe2aa2b39dc2d201";