mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Avoid test failures
This is a bit of a workaround (I'm pretty sure these tests are not running correctly on appveyor) but I think it will do for now. Cannot repro failures locally at all.
This commit is contained in:
parent
78c7170e86
commit
7d668c81fc
@ -60,13 +60,9 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
var match = Regex.Match(componentName, "-([0-9]*)");
|
var match = Regex.Match(componentName, "-([0-9]*)");
|
||||||
|
|
||||||
if (match.Length > 0)
|
if (match.Length > 0 && int.TryParse(match.Groups[1].Value, out var number) && number < 60)
|
||||||
{
|
|
||||||
var number = int.Parse(match.Groups[1].Value);
|
|
||||||
if (number < 60)
|
|
||||||
return base.GetTexture(componentName.Replace($"-{number}", $"-{number % 2}"));
|
return base.GetTexture(componentName.Replace($"-{number}", $"-{number % 2}"));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return base.GetTexture(componentName);
|
return base.GetTexture(componentName);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user