diff --git a/test/tests/LanguagePackTest.cpp b/test/tests/LanguagePackTest.cpp index 6d6e0263c2..355f881746 100644 --- a/test/tests/LanguagePackTest.cpp +++ b/test/tests/LanguagePackTest.cpp @@ -1,4 +1,5 @@ #include "localisation/LanguagePack.h" +#include "localisation/string_ids.h" #include TEST(LanguagePackTest, create_empty) @@ -34,6 +35,10 @@ TEST(LanguagePackTest, language_pack_simple) ASSERT_STREQ(lang->GetString(0x7000), "Arid Heights scenario string"); ASSERT_EQ(lang->GetObjectOverrideStringId("CONDORRD", 0), 0x6000); ASSERT_STREQ(lang->GetString(0x6000), "my test ride"); + // Test some negatives too + ASSERT_EQ(lang->GetString(1000), nullptr); + ASSERT_EQ(lang->GetScenarioOverrideStringId("No such park", 0), STR_NONE); + ASSERT_EQ(lang->GetObjectOverrideStringId(" ", 0), STR_NONE); delete lang; } @@ -98,4 +103,4 @@ const unsigned char LanguageZhTW[] = { 0xe8, 0x88, 0xac, 0xe7, 0x9a, 0x84, 0xe5, 0xbf, 0xab, 0xe6, 0x84, 0x9f, 0x0a, 0x53, 0x54, 0x52, 0x5f, 0x43, 0x50, 0x54, 0x59, 0x20, 0x20, 0x20, 0x20, 0x3a, 0xe6, 0xaf, 0x8f, 0xe8, 0xbb, 0x8a, 0xe5, 0x8d, 0xa1, 0x34, 0xe4, 0xbd, 0x8d, 0xe4, 0xb9, 0x98, 0xe5, 0xae, 0xa2, 0x0a, 0x00 -}; \ No newline at end of file +};