mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Make the Catcher.Colour assertion read better
This commit is contained in:
parent
2d4077e713
commit
730b5ea1a9
@ -130,9 +130,16 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
});
|
||||
|
||||
AddAssert("catcher colour is correct", () =>
|
||||
expectedCatcherColour == Catcher.DEFAULT_HYPER_DASH_COLOUR
|
||||
? catcherArea.MovableCatcher.Colour == Catcher.DEFAULT_CATCHER_HYPER_DASH_COLOUR
|
||||
: catcherArea.MovableCatcher.Colour == expectedCatcherColour);
|
||||
{
|
||||
var expected = expectedCatcherColour;
|
||||
|
||||
if (expected == Catcher.DEFAULT_HYPER_DASH_COLOUR)
|
||||
// The expected colour for Catcher.Colour is another colour
|
||||
// for the default skin, assert with that instead.
|
||||
expected = Catcher.DEFAULT_CATCHER_HYPER_DASH_COLOUR;
|
||||
|
||||
return catcherArea.MovableCatcher.Colour == expected;
|
||||
});
|
||||
|
||||
AddAssert("catcher trails colours are correct", () => trails.HyperDashTrailsColour == expectedCatcherColour);
|
||||
AddAssert("catcher end-glow colours are correct", () => trails.EndGlowSpritesColour == (expectedEndGlowColour ?? expectedCatcherColour));
|
||||
|
Loading…
Reference in New Issue
Block a user