Skip to content

Commit

Permalink
Add: scheduler test
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnulusGames committed Jan 16, 2024
1 parent 160af2c commit 349a542
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/LitMotion/Assets/LitMotion/Tests/Runtime/SchedulerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ public IEnumerator Test_Scheduler_Update()
.ToYieldInteraction();
}

[UnityTest]
public IEnumerator Test_Scheduler_Update_WithHalfTimeScale()
{
Time.timeScale = 0.5f;
var t = Time.unscaledTimeAsDouble;
yield return LMotion.Create(0f, 10f, Duration)
.WithScheduler(MotionScheduler.Update)
.RunWithoutBinding()
.ToYieldInteraction();
Assert.That(Time.unscaledTimeAsDouble - t, Is.GreaterThan(Duration * 2f));
}

[UnityTest]
public IEnumerator Test_Scheduler_Update_IgnoreTimeScale()
{
Expand Down

0 comments on commit 349a542

Please sign in to comment.