blob: 0041d736027963640afe651fb194ad4e5562497b (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Timeline check (design.md "Acceptance: timeline"), from
# noc/test/accel_to_mouse.timeline.script. State is the example index, the
# language and the time, summed from recorded ticks: a replay must land on
# the same example, language and time to the bit, and draw the same picture.
# 1. Record: keys and a click change example and language while time runs.
frames 10
console snapshot 1
console record 0
frames 20
key right
frames 15
key l
frames 10
down 300 300
up 300 300
frames 20
key right
key right
frames 10
key l
key left
frames 25
expect example 3
expect language zig
console save 2
# 2. Played to the end, exactly.
console play 0
frames 150
expect-snapshot 2
screenshot .zig-cache/e2e/shaders-played.png
# 5. Paused: `draw` must not move State (time included).
frames 30
expect-snapshot 2
# 3. Sought to the end, and to the middle and played on.
console seek end
expect-snapshot 2
screenshot .zig-cache/e2e/shaders-sought.png
# 7. What a seek shows equals what playing showed.
expect-same-screenshot .zig-cache/e2e/shaders-played.png .zig-cache/e2e/shaders-sought.png
console seek 1000
console pause
frames 10
console pause
frames 30
console pause
frames 150
expect-snapshot 2
# 4. Stepped from the start, then back and forth.
console seek start
console step 100000
expect-snapshot 2
console step -25
console step 25
expect-snapshot 2
screenshot .zig-cache/e2e/shaders-stepped.png
expect-same-screenshot .zig-cache/e2e/shaders-played.png .zig-cache/e2e/shaders-stepped.png
# 6. Live input (a click, a key), then the same replay.
console stop
down 100 100
up 100 100
key l
frames 10
console play 0
frames 150
expect-snapshot 2
console stop
|