Skip to content

Commit

Permalink
Fix TestSceneFruitRandomness
Browse files Browse the repository at this point in the history
  • Loading branch information
OliBomby committed Aug 13, 2023
1 parent 90f2aca commit b9d0a8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions osu.Game.Rulesets.Catch.Tests/TestSceneFruitRandomness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public TestSceneFruitRandomness()
AddSliderStep("start time", 500, 600, 0, x =>
{
drawableFruit.HitObject.StartTime = drawableBanana.HitObject.StartTime = x;
drawableFruit.RefreshStateTransforms();
drawableBanana.RefreshStateTransforms();
});
}

Expand All @@ -44,6 +46,8 @@ public void TestFruitRandomness()
AddStep("Initialize start time", () =>
{
drawableFruit.HitObject.StartTime = drawableBanana.HitObject.StartTime = initial_start_time;
drawableFruit.RefreshStateTransforms();
drawableBanana.RefreshStateTransforms();
fruitRotation = drawableFruit.DisplayRotation;
bananaRotation = drawableBanana.DisplayRotation;
Expand All @@ -54,6 +58,8 @@ public void TestFruitRandomness()
AddStep("change start time", () =>
{
drawableFruit.HitObject.StartTime = drawableBanana.HitObject.StartTime = another_start_time;
drawableFruit.RefreshStateTransforms();
drawableBanana.RefreshStateTransforms();
});

AddAssert("fruit rotation is changed", () => drawableFruit.DisplayRotation != fruitRotation);
Expand All @@ -64,6 +70,8 @@ public void TestFruitRandomness()
AddStep("reset start time", () =>
{
drawableFruit.HitObject.StartTime = drawableBanana.HitObject.StartTime = initial_start_time;
drawableFruit.RefreshStateTransforms();
drawableBanana.RefreshStateTransforms();
});

AddAssert("rotation and size restored", () =>
Expand Down

0 comments on commit b9d0a8a

Please sign in to comment.