|
|
@ -195,6 +195,7 @@ void main() {
|
|
|
|
plunger = Plunger(
|
|
|
|
plunger = Plunger(
|
|
|
|
compressionDistance: compressionDistance,
|
|
|
|
compressionDistance: compressionDistance,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
group('initializes with', () {
|
|
|
|
group('initializes with', () {
|
|
|
@ -202,7 +203,6 @@ void main() {
|
|
|
|
'plunger body as bodyA',
|
|
|
|
'plunger body as bodyA',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
@ -218,7 +218,6 @@ void main() {
|
|
|
|
'anchor body as bodyB',
|
|
|
|
'anchor body as bodyB',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
@ -235,7 +234,6 @@ void main() {
|
|
|
|
'limits enabled',
|
|
|
|
'limits enabled',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
@ -252,7 +250,6 @@ void main() {
|
|
|
|
'lower translation limit as negative infinity',
|
|
|
|
'lower translation limit as negative infinity',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
@ -269,7 +266,6 @@ void main() {
|
|
|
|
'connected body collison enabled',
|
|
|
|
'connected body collison enabled',
|
|
|
|
(game) async {
|
|
|
|
(game) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
@ -287,7 +283,6 @@ void main() {
|
|
|
|
'plunger cannot go below anchor',
|
|
|
|
'plunger cannot go below anchor',
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
// Giving anchor a shape for the plunger to collide with.
|
|
|
|
// Giving anchor a shape for the plunger to collide with.
|
|
|
@ -310,7 +305,6 @@ void main() {
|
|
|
|
'plunger cannot excessively exceed starting position',
|
|
|
|
'plunger cannot excessively exceed starting position',
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
setUp: (game, tester) async {
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
await game.ensureAdd(plunger);
|
|
|
|
anchor = PlungerAnchor(plunger: plunger);
|
|
|
|
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
await game.ensureAdd(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|
final jointDef = PlungerAnchorPrismaticJointDef(
|
|
|
|