Skip to content

Commit

Permalink
restore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaverickProgrammer committed Nov 5, 2024
1 parent ece8953 commit 6dd88a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/flame/test/effects/sequence_effect_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ void main() {
[
MoveEffect.to(Vector2(10, 10), EffectController(duration: 3)),
],
alternate: true,
);
expect(effect.controller.duration, 6);
expect(effect.controller.isRandom, false);
Expand All @@ -36,6 +37,7 @@ void main() {
[
MoveEffect.to(Vector2.zero(), EffectController(duration: 1)),
],
alternate: true,
infinite: true,
);
expect(effect.controller.duration, double.infinity);
Expand All @@ -54,6 +56,7 @@ void main() {
final effect = SequenceEffect(
[randomEffect],
repeatCount: 1000,
alternate: true,
);
expect(
effect.controller.duration,
Expand Down Expand Up @@ -153,6 +156,7 @@ void main() {
MoveEffect.by(Vector2(10, 0), EffectController(duration: 1)),
MoveEffect.by(Vector2(0, 10), EffectController(duration: 1)),
],
alternate: true,
);
expect(effect.controller.duration, 4);

Expand Down Expand Up @@ -182,6 +186,7 @@ void main() {
MoveEffect.by(Vector2(1, 0), controller()),
MoveEffect.by(Vector2(0, 1), controller()),
],
alternate: true,
);

final component = PositionComponent()..add(effect);
Expand Down Expand Up @@ -250,6 +255,7 @@ void main() {
MoveEffect.to(Vector2(x3, y3), duration(1)),
],
repeatCount: 2,
alternate: true,
),
MoveEffect.by(Vector2(x4 - x1, y4 - y1), duration(2)),
SequenceEffect(
Expand All @@ -258,6 +264,7 @@ void main() {
MoveEffect.by(Vector2(0, dy5), duration(1)),
],
repeatCount: 5,
alternate: true,
),
],
);
Expand Down

0 comments on commit 6dd88a1

Please sign in to comment.