mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Fix TestSceneFailJudgement
asserts no longer being correct
This commit is contained in:
parent
a25be9927d
commit
5f68999893
@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddUntilStep("player is playing", () => Player.LocalUserPlaying.Value);
|
AddUntilStep("player is playing", () => Player.LocalUserPlaying.Value);
|
||||||
AddUntilStep("wait for fail", () => Player.GameplayState.ShownFailAnimation);
|
AddUntilStep("wait for fail", () => Player.GameplayState.ShownFailAnimation);
|
||||||
AddAssert("player is not playing", () => !Player.LocalUserPlaying.Value);
|
AddAssert("player is not playing", () => !Player.LocalUserPlaying.Value);
|
||||||
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits > 1);
|
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).DrawableRuleset.Playfield.AllEntries.Count(e => e.Judged) > 1);
|
||||||
AddAssert("total number of results == 1", () =>
|
AddAssert("total number of results == 1", () =>
|
||||||
{
|
{
|
||||||
var score = new ScoreInfo { Ruleset = Ruleset.Value };
|
var score = new ScoreInfo { Ruleset = Ruleset.Value };
|
||||||
|
@ -78,6 +78,25 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// All the <see cref="HitObjectLifetimeEntry"/>s contained in this <see cref="Playfield"/> and all <see cref="NestedPlayfields"/>.
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<HitObjectLifetimeEntry> AllEntries
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (HitObjectContainer == null)
|
||||||
|
return Enumerable.Empty<HitObjectLifetimeEntry>();
|
||||||
|
|
||||||
|
var enumerable = HitObjectContainer.Entries;
|
||||||
|
|
||||||
|
if (nestedPlayfields.Count != 0)
|
||||||
|
enumerable = enumerable.Concat(NestedPlayfields.SelectMany(p => p.AllEntries));
|
||||||
|
|
||||||
|
return enumerable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All <see cref="Playfield"/>s nested inside this <see cref="Playfield"/>.
|
/// All <see cref="Playfield"/>s nested inside this <see cref="Playfield"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user