Increase lenience of alpha check in `TestSceneOsuModNoScope`

I believe the [test
failures](https://github.com/ppy/osu/runs/4977283066?check_suite_focus=true)
we're seeing here are due to the implementation of interpolation of the
alpha being frame dependent (in a way that doesn't interact well with
tests). The reason for never hitting the expected value is that the
beatmap ends, causing the cursor to become fully visible again.

It's probably already good-enough for most cases, so let's attempt to
silence these test failures by not checking so precisely for the alpha
value.

We're checking for either 1 or 0 so it's not too important how close it
is to either.
This commit is contained in:
Dean Herbert 2022-01-28 18:35:59 +09:00
parent f021a274d2
commit 17f0d7897b
1 changed files with 1 additions and 1 deletions

View File

@ -145,6 +145,6 @@ public void TestVisibleAfterComboBreak()
private bool isBreak() => Player.IsBreakTime.Value;
private bool cursorAlphaAlmostEquals(float alpha) => Precision.AlmostEquals(Player.DrawableRuleset.Cursor.Alpha, alpha);
private bool cursorAlphaAlmostEquals(float alpha) => Precision.AlmostEquals(Player.DrawableRuleset.Cursor.Alpha, alpha, 0.1f);
}
}