summaryrefslogtreecommitdiff
path: root/examples/noc/test/additive_blending.reload.script
diff options
context:
space:
mode:
Diffstat (limited to 'examples/noc/test/additive_blending.reload.script')
-rw-r--r--examples/noc/test/additive_blending.reload.script33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/noc/test/additive_blending.reload.script b/examples/noc/test/additive_blending.reload.script
new file mode 100644
index 0000000..a3d499a
--- /dev/null
+++ b/examples/noc/test/additive_blending.reload.script
@@ -0,0 +1,33 @@
+# Live reload (design.md "Acceptance: live reload"): play a while, pause a
+# replay so State holds still, load the edited build ({v2}: blue glow), check that
+# State carried over and the picture changed.
+move 480 200
+frames 60
+console record 0
+frames 30
+console stop
+console play 0
+frames 10
+console pause
+frames 2
+expect clock.count 71
+expect particles.len 123
+expect particles.buffer[0].position[0] 390.325 ~0.001
+expect particles.buffer[0].position[1] 266.726 ~0.001
+screenshot .zig-cache/e2e/additive_blending-before.png
+frames 1
+load {v2}
+expect clock.count 71
+expect particles.len 123
+expect particles.buffer[0].position[0] 390.325 ~0.001
+expect particles.buffer[0].position[1] 266.726 ~0.001
+frames 2
+screenshot .zig-cache/e2e/additive_blending-after.png
+frames 1
+expect-different-screenshot .zig-cache/e2e/additive_blending-before.png .zig-cache/e2e/additive_blending-after.png
+# Playing on after the reload: State goes on from where it was.
+console pause
+frames 10
+expect clock.count 81
+expect particles.buffer[0].position[0] 411.893 ~0.001
+expect particles.buffer[0].position[1] 231.211 ~0.001