Skip to content

Commit 420785f

Browse files
fix tests (#112)
1 parent 9d79061 commit 420785f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.cloudbuild/deploy-to-cloud-run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ steps:
2626

2727
options:
2828
pool:
29-
name: 'projects/fir-sandbox-326008/locations/us-east4/workerPools/fir'
29+
name: 'projects/fir-sandbox-326008/locations/us-east4/workerPools/fir'

tests/BouncingBallTest.elm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,27 @@ import Pages.BouncingBall exposing (Model, RunningState(..), computeNextPos)
55
import Test exposing (..)
66

77

8+
dt =
9+
30
10+
11+
812
suite : Test
913
suite =
1014
describe "Bouncing ball app"
1115
[ describe "Play/pause resume logic"
1216
[ test "simulation is paused, no changes should happen"
1317
(\_ ->
14-
computeNextPos case1
18+
computeNextPos case1 dt
1519
|> Expect.equal ( case1.ballPos, case1.hist, case1.currentFrame )
1620
)
1721
, test "simulation is playing, no historic recall"
1822
(\_ ->
19-
computeNextPos case2
20-
|> Expect.equal ( { rx = 1, ry = 1.725, vx = 1, vy = -1.488, x = 10.033333333333333, y = 9.9504 }, [ { rx = 1, ry = 1, vx = 1, vy = 1, x = 9, y = 11 }, { rx = 1, ry = 1.725, vx = 1, vy = -1.488, x = 10.033333333333333, y = 9.9504 } ], 2 )
23+
computeNextPos case2 dt
24+
|> Expect.equal ( { rx = 1, ry = 1.725, vx = 1, vy = -1.4292, x = 10.03, y = 9.957124 }, [ { rx = 1, ry = 1, vx = 1, vy = 1, x = 9, y = 11 }, { rx = 1, ry = 1.725, vx = 1, vy = -1.4292, x = 10.03, y = 9.957124 } ], 2 )
2125
)
2226
, test "simulation is playing, but via historic recall"
2327
(\_ ->
24-
computeNextPos case3
28+
computeNextPos case3 dt
2529
|> Expect.equal ( { rx = 1, ry = 1, vx = 1, vy = 1, x = 9, y = 11 }, [ { rx = 1, ry = 1, vx = 1, vy = 1, x = 9, y = 11 } ], 1 )
2630
)
2731
]

0 commit comments

Comments
 (0)