Fix code style warnings in test project when targeting .NET 8
see 69b923ad5
This commit is contained in:
parent
48f4a98a61
commit
5220ed4179
|
@ -66,11 +66,13 @@ namespace BizHawk.Common
|
|||
return data;
|
||||
}
|
||||
|
||||
#if !(NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_0_OR_GREATER)
|
||||
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kvp, out TKey key, out TValue value)
|
||||
{
|
||||
key = kvp.Key;
|
||||
value = kvp.Value;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <remarks>adapted from https://stackoverflow.com/a/3928856/7467292, values are compared using <see cref="EqualityComparer{T}.Default">EqualityComparer.Default</see></remarks>
|
||||
public static bool DictionaryEqual<TKey, TValue>(IDictionary<TKey, TValue> a, IDictionary<TKey, TValue> b)
|
||||
|
|
|
@ -29,7 +29,9 @@ namespace BizHawk.Tests.Client.Common.config
|
|||
appliesTo.All(multiCoreSystems.Contains),
|
||||
appliesTo.Length is 1
|
||||
? $"core picker has submenu for {appliesTo[0]}, but that system doesn't have alternate cores"
|
||||
#pragma warning disable MA0089 // CI build this for .NET Core where there's a `char` overload for `string.Join`
|
||||
: $"core picker has submenu for {appliesTo[0]} ({string.Join("/", appliesTo)}), but none of those systems have alternate cores");
|
||||
#pragma warning restore MA0089
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@ using System.Drawing;
|
|||
using System.Reflection;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
#if !(NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_0_OR_GREATER)
|
||||
using BizHawk.Common;
|
||||
#endif
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
|
|
@ -47,9 +47,11 @@ namespace BizHawk.Tests.Emulation.Common
|
|||
}
|
||||
}
|
||||
if (dupes.Count is 0) return;
|
||||
#pragma warning disable MA0089 // CI build this for .NET Core where there's a `char` overload for `string.Join`
|
||||
Assert.Fail($"multiple {nameof(FirmwareFile)}s have the same suggested filename (breaks Organize function):\n{
|
||||
string.Join("\n", dupes.Select(static ff => $"\t{ff.RecommendedName} {ff.Hash}").Order())
|
||||
}");
|
||||
#pragma warning restore MA0089
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue