diff options
Diffstat (limited to 'examples/noc/test/path_following.script')
| -rw-r--r-- | examples/noc/test/path_following.script | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/noc/test/path_following.script b/examples/noc/test/path_following.script new file mode 100644 index 0000000..0a879b5 --- /dev/null +++ b/examples/noc/test/path_following.script @@ -0,0 +1,22 @@ +# Two vehicles follow a four-point path; the slower one drifts wider. +# Space hides the debugging lines; a click makes a new path. +expect path[1][0] 105.627 ~0.001 +frames 240 +expect cars[0].position[0] 353.657 ~0.001 +expect cars[1].position[1] 239.221 ~0.001 +screenshot .zig-cache/e2e/path_following.png +key space +expect debug false +frames 1 +screenshot .zig-cache/e2e/path_following-plain.png +click 320 180 +key space +frames 120 +expect path[2][1] 198.958 ~0.001 +expect cars[1].position[0] 109.937 ~0.001 +# The road is 200 gray everywhere, its round joins included: translucent +# black drawn once. +expect-pixel .zig-cache/e2e/path_following-plain.png 105 80 200 200 200 255 +expect-pixel .zig-cache/e2e/path_following-plain.png 420 285 200 200 200 255 +expect-pixel .zig-cache/e2e/path_following-plain.png 110 100 200 200 200 255 +screenshot .zig-cache/e2e/path_following-new.png |
