summaryrefslogtreecommitdiff
path: root/examples/noc/test/flocking.reload.script
blob: 3af0d12dadba918f0d932b62b4466d5ba3532088 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Live reload keeps State: a drag, a paused replay, the edited build ({v2}:
# red bodies), the same boids after it, then play on.
frames 60
down 300 200
move 320 200
move 340 200
up 340 200
frames 30
console record 0
frames 30
console stop
console play 0
frames 10
console pause
frames 2
expect boids.len 122
expect boids.buffer[121].position[0] 294.264 ~0.01
screenshot .zig-cache/e2e/flocking-before.png
frames 1
load {v2}
expect boids.len 122
expect boids.buffer[121].position[0] 294.264 ~0.01
frames 2
screenshot .zig-cache/e2e/flocking-after.png
frames 1
expect-different-screenshot .zig-cache/e2e/flocking-before.png .zig-cache/e2e/flocking-after.png
# Unpaused: the replay goes on from where it was.
console pause
frames 15
expect clock.count 119