Skip to content

Commit

Permalink
Added: A new test that flexes the setEase() of a Tween.
Browse files Browse the repository at this point in the history
This should have been done a long time ago, is an obvious oversight.  Especially now in light of #32, where a theoretical (but not actual) memory leak could be triggered.
  • Loading branch information
WesWedding committed Feb 20, 2024
1 parent 5611bcf commit 373196f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/Tweens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,15 @@ unittest(restartingTweenStartsFromNewVal)
assertEqual(100.0, val);
}

unittest(changeEase)
{
float val = 0.0;
TweenDuino::Tween tween(val, 400UL, 100.0);
tween.setEase(TweenDuino::Tween::Ease::SINE, TweenDuino::Tween::EaseType::INOUT);
tween.setEase(TweenDuino::Tween::Ease::QUART, TweenDuino::Tween::EaseType::OUT);
tween.update(0UL);
tween.update(900UL);
assertTrue(tween.isComplete());
}

unittest_main()

0 comments on commit 373196f

Please sign in to comment.