Fix code style warnings in testroms projects

This commit is contained in:
YoshiRulz 2025-03-29 07:01:36 +10:00
parent ec0510367a
commit 72c8a00462
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,7 @@ namespace BizHawk.Tests.Testroms.GB
public sealed class BullyGB
{
[AttributeUsage(AttributeTargets.Method)]
private sealed class BullyTestData : Attribute, ITestDataSource
private sealed class BullyTestDataAttribute : Attribute, ITestDataSource
{
public IEnumerable<object?[]> GetData(MethodInfo methodInfo)
{

View File

@ -14,7 +14,7 @@ namespace BizHawk.Tests.Testroms.GB
public sealed class RTC3Test
{
[AttributeUsage(AttributeTargets.Method)]
private sealed class RTC3TestData : Attribute, ITestDataSource
private sealed class RTC3TestDataAttribute : Attribute, ITestDataSource
{
public IEnumerable<object?[]> GetData(MethodInfo methodInfo)
{

View File

@ -19,7 +19,9 @@ namespace BizHawk.Tests.Testroms.GB
/// <param name="fileExt">w/o leading '.'</param>
private static (string Expect, string Actual, string Glob) GenFilenames((string Suite, string Case) id, string fileExt = "png")
{
var prefix = $"{id.Suite}/{id.Case.GetHashCode():X8}"; // hashcode of string sadly not stable
#pragma warning disable RS0030 // hashcode of string sadly not stable so it's generally banned, but it's fine here
var prefix = $"{id.Suite}/{id.Case.GetHashCode():X8}";
#pragma warning restore RS0030
var suffix = $"{id.Case.RemoveInvalidFileSystemChars().Replace(' ', '_').Replace("(no BIOS)", "noBIOS")}.{fileExt}";
return ($"{prefix}_expect_{suffix}", $"{prefix}_actual_{suffix}", $"{prefix}_*_{suffix}");
}