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.h58
1 files changed, 35 insertions, 23 deletions
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index 393ae16d0a..ff34091536 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -285,9 +285,9 @@ TEST_CASE("[String] Testing for empty string") {
}
TEST_CASE("[String] Contains") {
- String s = "C:\\Godot\\project\\string_test.tscn";
+ String s = "C:\\Redot\\project\\string_test.tscn";
CHECK(s.contains(":\\"));
- CHECK(s.contains("Godot"));
+ CHECK(s.contains("Redot"));
CHECK(s.contains(String("project\\string_test")));
CHECK(s.contains(String("\\string_test.tscn")));
@@ -298,9 +298,9 @@ TEST_CASE("[String] Contains") {
}
TEST_CASE("[String] Contains case insensitive") {
- String s = "C:\\Godot\\project\\string_test.tscn";
- CHECK(s.containsn("Godot"));
- CHECK(s.containsn("godot"));
+ String s = "C:\\Redot\\project\\string_test.tscn";
+ CHECK(s.containsn("Redot"));
+ CHECK(s.containsn("Redot"));
CHECK(s.containsn(String("Project\\string_test")));
CHECK(s.containsn(String("\\string_Test.tscn")));
@@ -1409,7 +1409,7 @@ TEST_CASE("[String] Checking string is empty when it should be") {
if (!success) {
state = false;
}
- String b = "Godot";
+ String b = "Redot";
success = b[b.size()] == 0;
if (!success) {
state = false;
@@ -1420,7 +1420,7 @@ TEST_CASE("[String] Checking string is empty when it should be") {
state = false;
}
- const String d = "Godot";
+ const String d = "Redot";
success = d[d.size()] == 0;
if (!success) {
state = false;
@@ -1546,7 +1546,7 @@ TEST_CASE("[String] Count and countn functionality") {
s = "TestTestTest";
MULTICHECK_STRING_EQ(s, count, "TestTest", 1);
- s = "TestGodotTestGodotTestGodot";
+ s = "TestRedotTestRedotTestRedot";
MULTICHECK_STRING_EQ(s, count, "Test", 3);
s = "TestTestTestTest";
@@ -1615,12 +1615,12 @@ TEST_CASE("[String] dedent") {
}
TEST_CASE("[String] Path functions") {
- static const char *path[8] = { "C:\\Godot\\project\\test.tscn", "/Godot/project/test.xscn", "../Godot/project/test.scn", "Godot\\test.doc", "C:\\test.", "res://test", "user://test", "/.test" };
- static const char *base_dir[8] = { "C:\\Godot\\project", "/Godot/project", "../Godot/project", "Godot", "C:\\", "res://", "user://", "/" };
- static const char *base_name[8] = { "C:\\Godot\\project\\test", "/Godot/project/test", "../Godot/project/test", "Godot\\test", "C:\\test", "res://test", "user://test", "/" };
+ static const char *path[8] = { "C:\\Redot\\project\\test.tscn", "/Redot/project/test.xscn", "../Redot/project/test.scn", "Redot\\test.doc", "C:\\test.", "res://test", "user://test", "/.test" };
+ static const char *base_dir[8] = { "C:\\Redot\\project", "/Redot/project", "../Redot/project", "Redot", "C:\\", "res://", "user://", "/" };
+ static const char *base_name[8] = { "C:\\Redot\\project\\test", "/Redot/project/test", "../Redot/project/test", "Redot\\test", "C:\\test", "res://test", "user://test", "/" };
static const char *ext[8] = { "tscn", "xscn", "scn", "doc", "", "", "", "test" };
static const char *file[8] = { "test.tscn", "test.xscn", "test.scn", "test.doc", "test.", "test", "test", ".test" };
- static const char *simplified[8] = { "C:/Godot/project/test.tscn", "/Godot/project/test.xscn", "Godot/project/test.scn", "Godot/test.doc", "C:/test.", "res://test", "user://test", "/.test" };
+ static const char *simplified[8] = { "C:/Redot/project/test.tscn", "/Redot/project/test.xscn", "Redot/project/test.scn", "Redot/test.doc", "C:/test.", "res://test", "user://test", "/.test" };
static const bool abs[8] = { true, true, false, false, true, true, true, true };
for (int i = 0; i < 8; i++) {
@@ -1653,8 +1653,8 @@ TEST_CASE("[String] hash") {
}
TEST_CASE("[String] uri_encode/unescape") {
- String s = "Godot Engine:'docs'";
- String t = "Godot%20Engine%3A%27docs%27";
+ String s = "Redot Engine:'docs'";
+ String t = "Redot%20Engine%3A%27docs%27";
String x1 = "T%C4%93%C5%A1t";
static const uint8_t u8str[] = { 0x54, 0xC4, 0x93, 0xC5, 0xA1, 0x74, 0x00 };
@@ -1781,20 +1781,32 @@ TEST_CASE("[String] Reverse") {
}
TEST_CASE("[String] SHA1/SHA256/MD5") {
- String s = "Godot";
- String sha1 = "a1e91f39b9fce6a9998b14bdbe2aa2b39dc2d201";
+ String s = "Redot";
+ String sha1 = "fa4e7bc6eda6baf3600e392f46be46f699bd5a8a";
static uint8_t sha1_buf[20] = {
- 0xA1, 0xE9, 0x1F, 0x39, 0xB9, 0xFC, 0xE6, 0xA9, 0x99, 0x8B, 0x14, 0xBD, 0xBE, 0x2A, 0xA2, 0xB3,
- 0x9D, 0xC2, 0xD2, 0x01
+ 0xFA, 0x4E, 0x7B, 0xC6,
+ 0xED, 0xA6, 0xBA, 0xF3,
+ 0x60, 0x0E, 0x39, 0x2F,
+ 0x46, 0xBE, 0x46, 0xF6,
+ 0x99, 0xBD, 0x5A, 0x8A
};
- String sha256 = "2a02b2443f7985d89d09001086ae3dcfa6eb0f55c6ef170715d42328e16e6cb8";
+ String sha256 = "5b33770f1e60d19c83ba6be484306fa1fcf5266e6ee8de2f4456483e92327c1a";
static uint8_t sha256_buf[32] = {
- 0x2A, 0x02, 0xB2, 0x44, 0x3F, 0x79, 0x85, 0xD8, 0x9D, 0x09, 0x00, 0x10, 0x86, 0xAE, 0x3D, 0xCF,
- 0xA6, 0xEB, 0x0F, 0x55, 0xC6, 0xEF, 0x17, 0x07, 0x15, 0xD4, 0x23, 0x28, 0xE1, 0x6E, 0x6C, 0xB8
+ 0x5B, 0x33, 0x77, 0x0F,
+ 0x1E, 0x60, 0xD1, 0x9C,
+ 0x83, 0xBA, 0x6B, 0xE4,
+ 0x84, 0x30, 0x6F, 0xA1,
+ 0xFC, 0xF5, 0x26, 0x6E,
+ 0x6E, 0xE8, 0xDE, 0x2F,
+ 0x44, 0x56, 0x48, 0x3E,
+ 0x92, 0x32, 0x7C, 0x1A
};
- String md5 = "4a336d087aeb0390da10ee2ea7cb87f8";
+ String md5 = "a417866a47d1710210ed143c47ad5e4d";
static uint8_t md5_buf[16] = {
- 0x4A, 0x33, 0x6D, 0x08, 0x7A, 0xEB, 0x03, 0x90, 0xDA, 0x10, 0xEE, 0x2E, 0xA7, 0xCB, 0x87, 0xF8
+ 0xA4, 0x17, 0x86, 0x6A,
+ 0x47, 0xD1, 0x71, 0x02,
+ 0x10, 0xED, 0x14, 0x3C,
+ 0x47, 0xAD, 0x5E, 0x4D
};
PackedByteArray buf = s.sha1_buffer();