Skip to content

Commit

Permalink
Reverted Some Unit Test Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DelnarErsike committed May 9, 2024
1 parent 8a2f339 commit 601894d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Chummer.Tests/ChummerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,22 +331,25 @@ public void Test05_LoadThenPrint()
}

lstExportLanguages.Sort();
// Always try to export in English first because this will cover most export code
lstExportLanguages.Insert(0, GlobalSettings.DefaultLanguage);

Debug.WriteLine("Started pre-loading language files");
Debug.WriteLine("Pre-loading language file: " + GlobalSettings.DefaultLanguage);
LanguageManager.LoadLanguage(GlobalSettings.DefaultLanguage);
foreach (string strExportLanguage in lstExportLanguages)
{
Debug.WriteLine("Pre-loading language file: " + strExportLanguage);
LanguageManager.LoadLanguage(strExportLanguage);
}
Debug.WriteLine("Finished pre-loading language files");
int intLanguageIndex = 0;
foreach (Character objCharacter in GetTestCharacters())
{
Debug.WriteLine("Checking " + (Path.GetFileName(objCharacter.FileName)
?? LanguageManager.GetString("String_Unknown")));
foreach (string strLanguage in lstExportLanguages)
DoAndSaveExport(objCharacter, strLanguage);
// Always try to export in English because this will cover most export code
DoAndSaveExport(objCharacter, GlobalSettings.DefaultLanguage);
// Rotate through languages instead of testing every one for every character to save on execution time
DoAndSaveExport(objCharacter, lstExportLanguages[intLanguageIndex++ % lstExportLanguages.Count]);
}
}

Expand Down

0 comments on commit 601894d

Please sign in to comment.