From cfedbb92c1ad6bb4ee58cf54fd7654d827da5be2 Mon Sep 17 00:00:00 2001 From: Darius Wattimena Date: Thu, 18 Nov 2021 20:07:03 +0100 Subject: [PATCH] Added a unit test to cover clearing of the plate when missing the last banana --- osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs index 29a7b03ad3..bc94b50301 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs @@ -168,6 +168,17 @@ namespace osu.Game.Rulesets.Catch.Tests checkHyperDash(false); } + [Test] + public void TestLastBananaShouldClearPlate() + { + AddStep("catch fruit", () => attemptCatch(new Fruit())); + checkPlate(1); + AddStep("miss banana", () => attemptCatch(new Banana { X = 100 })); + checkPlate(1); + AddStep("miss last banana", () => attemptCatch(new Banana { LastInCombo = true, X = 100 })); + checkPlate(0); + } + [Test] public void TestCatcherRandomStacking() {