1
0
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:
Salman Ahmed 2020-04-22 10:40:21 +03:00
parent 2d4077e713
commit 730b5ea1a9
No known key found for this signature in database
GPG Key ID: ED81FD33FD9B58BC

View File

@ -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));