mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
Add test catching lifetime change while KeepAlive is true
This commit is contained in:
parent
86020adf64
commit
977d44df87
@ -117,8 +117,12 @@ namespace osu.Game.Tests.Gameplay
|
||||
AddStep("Modify start time", () => entry.HitObject.StartTime = 100);
|
||||
AddAssert("Drawable lifetime is correct", () => dho.LifetimeStart == double.MinValue);
|
||||
|
||||
AddStep("Set LifetimeEnd", () => dho.LifetimeEnd = 999);
|
||||
AddAssert("Lifetime change is blocked", () => dho.LifetimeEnd == double.MaxValue);
|
||||
|
||||
AddStep("KeepAlive = false", () => entry.KeepAlive = false);
|
||||
AddAssert("Drawable lifetime is restored", () => dho.LifetimeStart == 100 - TestLifetimeEntry.INITIAL_LIFETIME_OFFSET);
|
||||
AddAssert("Drawable lifetime is restored", () =>
|
||||
dho.LifetimeStart == 100 - TestLifetimeEntry.INITIAL_LIFETIME_OFFSET && dho.LifetimeEnd == 999);
|
||||
}
|
||||
|
||||
private class TestDrawableHitObject : DrawableHitObject
|
||||
|
Loading…
Reference in New Issue
Block a user