diff options
Diffstat (limited to 'examples/noc/test/pendulum.script')
| -rw-r--r-- | examples/noc/test/pendulum.script | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/noc/test/pendulum.script b/examples/noc/test/pendulum.script new file mode 100644 index 0000000..244be44 --- /dev/null +++ b/examples/noc/test/pendulum.script @@ -0,0 +1,18 @@ +# Grab the bob where it starts (angle PI/4), drag it out to the left, let go. +down 444 154 +expect dragging true +move 300 120 +move 200 100 +move 160 60 +frames 2 +expect dragging true +# The rod points at the pointer: (160, 60) from the pivot (320, 30). +expect angle -1.3854 ~0.001 +up 160 60 +expect dragging false +# Let go from rest: one step of gravity since. +expect angle_velocity 0.0022 ~0.0001 +# It swings back from the left. +frames 40 +expect angle 0.1588 ~0.001 +screenshot .zig-cache/e2e/pendulum.png |
