Let LocalizedDatasetPrototypeTest report multiple failures (#35876)

This commit is contained in:
Tayrtahn 2025-03-16 17:32:08 -04:00 committed by deltanedas
parent 795c2c9829
commit 5f5435ebef
1 changed files with 10 additions and 7 deletions

View File

@ -19,16 +19,19 @@ public sealed class LocalizedDatasetPrototypeTest
var protos = protoMan.EnumeratePrototypes<LocalizedDatasetPrototype>().OrderBy(p => p.ID);
// Check each prototype
foreach (var proto in protos)
Assert.Multiple(() =>
{
// Check each value in the prototype
foreach (var locId in proto.Values)
// Check each prototype
foreach (var proto in protos)
{
// Make sure the localization manager has a string for the LocId
Assert.That(localizationMan.HasString(locId), $"LocalizedDataset {proto.ID} with prefix \"{proto.Values.Prefix}\" specifies {proto.Values.Count} entries, but no localized string was found matching {locId}!");
// Check each value in the prototype
foreach (var locId in proto.Values)
{
// Make sure the localization manager has a string for the LocId
Assert.That(localizationMan.HasString(locId), $"LocalizedDataset {proto.ID} with prefix \"{proto.Values.Prefix}\" specifies {proto.Values.Count} entries, but no localized string was found matching {locId}!");
}
}
}
});
await pair.CleanReturnAsync();
}