summaryrefslogtreecommitdiff
path: root/examples/noc/test/noise_walker.script
blob: b15c60a2f20e268635cb7dcbbebd13d4f8e69305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# One second of the walk, saved; four more; then the snapshot loads back.
# The trail is an offscreen image in Session, so the load (`in.jumped`)
# repaints it up to the loaded step: the screenshot shows two seconds of
# trail, not six, and equals a straight two-second run's.
frames 60
console save 1
expect clock.count 60
expect walker.x 422.59 ~0.01
expect walker.y 187.75 ~0.01
frames 240
console load 1
expect clock.count 60
frames 60
expect clock.count 120
screenshot .zig-cache/e2e/noise_walker.png
console reset
# The console line's frame takes the first step.
expect clock.count 1
frames 119
expect clock.count 120
screenshot .zig-cache/e2e/noise_walker-straight.png
expect-same-screenshot .zig-cache/e2e/noise_walker.png .zig-cache/e2e/noise_walker-straight.png