add test to check for missing core preferences choices
This commit is contained in:
parent
d245271649
commit
6c49fa7472
|
@ -3,6 +3,7 @@ using System.Linq;
|
|||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.CollectionExtensions;
|
||||
using BizHawk.Emulation.Cores;
|
||||
|
||||
namespace BizHawk.Tests.Client.Common.config
|
||||
|
@ -45,5 +46,16 @@ namespace BizHawk.Tests.Client.Common.config
|
|||
Assert.IsTrue(allCoreNames.Contains(coreName), $"core picker includes nonexistant core \"{coreName}\" under {appliesTo[0]} group");
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AssertNoMissingChoices()
|
||||
{
|
||||
var multiCoreSystems = CoreInventory.Instance.AllCores.Where(kvp => kvp.Value.Count != 1).ToArray();
|
||||
foreach (var (sysID, cores) in multiCoreSystems)
|
||||
{
|
||||
Assert.IsTrue(DefaultCorePrefDict.ContainsKey(sysID), $"missing default core preference for {sysID} with {cores.Count} core choices");
|
||||
Assert.IsTrue(Config.CorePickerUIData.Any(item => item.AppliesTo.Contains(sysID)), $"missing core picker submenu for {sysID} with {cores.Count} core choices");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue