1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 01:25:20 +02:00

Fix tests that rely on UTF-8 literals

and the lowercase function
This commit is contained in:
sfan5
2024-03-24 10:33:41 +01:00
parent 08284e420d
commit d307d01b18
4 changed files with 40 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ void TestSettings::runTests(IGameDef *gamedef)
////////////////////////////////////////////////////////////////////////////////
const char *TestSettings::config_text_before =
"leet = 1337\n"
u8"leet = 1337\n"
"leetleet = 13371337\n"
"leetleet_neg = -13371337\n"
"floaty_thing = 1.1\n"
@@ -77,7 +77,7 @@ const char *TestSettings::config_text_before =
"[dummy_eof_end_tag]\n";
const std::string TestSettings::config_text_after =
"leet = 1337\n"
u8"leet = 1337\n"
"leetleet = 13371337\n"
"leetleet_neg = -13371337\n"
"floaty_thing = 1.1\n"
@@ -154,7 +154,7 @@ void TestSettings::testAllSettings()
// Not sure if 1.1 is an exact value as a float, but doesn't matter
UASSERT(fabs(s.getFloat("floaty_thing") - 1.1) < 0.001);
UASSERT(s.get("stringy_thing") == "asd /( ¤%&(/\" BLÖÄRP");
UASSERT(s.get("stringy_thing") == u8"asd /( ¤%&(/\" BLÖÄRP");
UASSERT(fabs(s.getV3F("coord").X - 1.0) < 0.001);
UASSERT(fabs(s.getV3F("coord").Y - 2.0) < 0.001);
UASSERT(fabs(s.getV3F("coord").Z - 4.5) < 0.001);