mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Add full asserts
This commit is contained in:
parent
ad6b8d3e04
commit
9f2a648432
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
|
||||||
@ -39,7 +40,8 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
public HitWindows()
|
public HitWindows()
|
||||||
{
|
{
|
||||||
Debug.Assert(GetRanges().Length >= 1, $"{nameof(HitWindows)}");
|
Debug.Assert(GetRanges().Any(r => r.Result == HitResult.Miss), $"{nameof(GetRanges)} should always contain {nameof(HitResult.Miss)}");
|
||||||
|
Debug.Assert(GetRanges().Any(r => r.Result != HitResult.Miss), $"{nameof(GetRanges)} should always contain at least one result type other than {nameof(HitResult.Miss)}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user