refactor: renamed other to dummy

pull/267/head
alestiago 3 years ago
parent e064e68b81
commit 9386085f32

@ -47,29 +47,29 @@ void main() {
..worldManifold.normal.setFrom(Vector2.all(1));
await component2.add(behavior2);
final other1 = _TestBodyComponent();
final other2 = _TestBodyComponent();
final dummy1 = _TestBodyComponent();
final dummy2 = _TestBodyComponent();
await game.ensureAddAll([
component1,
component2,
other1,
other2,
dummy1,
dummy2,
]);
final contact = _MockContact();
final contactImpulse = _MockContactImpulse();
behavior1.postSolve(other1, contact, contactImpulse);
behavior2.postSolve(other2, contact, contactImpulse);
behavior1.postSolve(dummy1, contact, contactImpulse);
behavior2.postSolve(dummy2, contact, contactImpulse);
expect(
other2.body.linearVelocity.x,
greaterThan(other1.body.linearVelocity.x),
dummy2.body.linearVelocity.x,
greaterThan(dummy1.body.linearVelocity.x),
);
expect(
other2.body.linearVelocity.y,
greaterThan(other1.body.linearVelocity.y),
dummy2.body.linearVelocity.y,
greaterThan(dummy1.body.linearVelocity.y),
);
},
);

Loading…
Cancel
Save