1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Enable NRT in TestSceneObjectOrderedHitPolicy

This commit is contained in:
Bartłomiej Dach 2023-08-22 14:30:55 +02:00
parent 71ec29041b
commit c9f611a713
No known key found for this signature in database

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
#nullable disable
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -380,7 +378,7 @@ namespace osu.Game.Rulesets.Osu.Tests
() => judgementResults.Single(r => r.HitObject == hitObject).Type, () => Is.EqualTo(result)); () => judgementResults.Single(r => r.HitObject == hitObject).Type, () => Is.EqualTo(result));
} }
private void addJudgementAssert(string name, Func<OsuHitObject> hitObject, HitResult result) private void addJudgementAssert(string name, Func<OsuHitObject?> hitObject, HitResult result)
{ {
AddAssert($"{name} judgement is {result}", AddAssert($"{name} judgement is {result}",
() => judgementResults.Single(r => r.HitObject == hitObject()).Type == result); () => judgementResults.Single(r => r.HitObject == hitObject()).Type == result);
@ -392,8 +390,8 @@ namespace osu.Game.Rulesets.Osu.Tests
() => Precision.AlmostEquals(judgementResults.Single(r => r.HitObject == hitObject).TimeOffset, offset, 100)); () => Precision.AlmostEquals(judgementResults.Single(r => r.HitObject == hitObject).TimeOffset, offset, 100));
} }
private ScoreAccessibleReplayPlayer currentPlayer; private ScoreAccessibleReplayPlayer currentPlayer = null!;
private List<JudgementResult> judgementResults; private List<JudgementResult> judgementResults = null!;
private void performTest(List<OsuHitObject> hitObjects, List<ReplayFrame> frames) private void performTest(List<OsuHitObject> hitObjects, List<ReplayFrame> frames)
{ {