Merge pull request #48784 from akien-mga/test-translation-fix-ordering
Tests: Don't assume translation map ordering
This commit is contained in:
commit
7731a50794
1 changed files with 6 additions and 4 deletions
|
@ -60,8 +60,9 @@ TEST_CASE("[Translation] Messages") {
|
|||
translation->get_message_list(&messages);
|
||||
CHECK(translation->get_message_count() == 2);
|
||||
CHECK(messages.size() == 2);
|
||||
CHECK(messages[0] == "Hello2");
|
||||
CHECK(messages[1] == "Hello3");
|
||||
// Messages are stored in a Map, don't assume ordering.
|
||||
CHECK(messages.find("Hello2"));
|
||||
CHECK(messages.find("Hello3"));
|
||||
}
|
||||
|
||||
TEST_CASE("[TranslationPO] Messages with context") {
|
||||
|
@ -99,8 +100,9 @@ TEST_CASE("[TranslationPO] Messages with context") {
|
|||
CHECK(translation->get_message_count() == 4);
|
||||
// Only the default context is taken into account.
|
||||
CHECK(messages.size() == 2);
|
||||
CHECK(messages[0] == "Hello2");
|
||||
CHECK(messages[1] == "Hello3");
|
||||
// Messages are stored in a Map, don't assume ordering.
|
||||
CHECK(messages.find("Hello2"));
|
||||
CHECK(messages.find("Hello3"));
|
||||
}
|
||||
|
||||
TEST_CASE("[TranslationPO] Plural messages") {
|
||||
|
|
Loading…
Reference in a new issue