summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYuri Roubinski <chaosus89@gmail.com>2023-06-21 20:40:48 +0300
committerYuri Roubinski <chaosus89@gmail.com>2023-06-21 20:40:48 +0300
commit230385b5875643c2e162e6c4d2a27aaef95e1cc8 (patch)
tree097b921e4ca343995af5c4cc4eec988c116ec4ff /tests
parent28a60b3de02e8cfcc742a248078e6b7ee8f728b1 (diff)
downloadredot-engine-230385b5875643c2e162e6c4d2a27aaef95e1cc8.tar.gz
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 7c76e7aa7b..afe6b8a7ed 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -1607,6 +1607,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";