about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_coord_debug.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_coord_debug.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_coord_debug.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_coord_debug.txt b/js/scripting-lang/scratch_tests/test_coord_debug.txt
new file mode 100644
index 0000000..8ef62d1
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_coord_debug.txt
@@ -0,0 +1,13 @@
+/* Test complex coordinate classification */
+
+/* Complex coordinate classification */
+classify_coordinates : x y ->
+  when ((x + 1) % 2) ((y - 1) % 2) is
+    0 0 then "both transformed even"
+    0 1 then "x transformed even, y transformed odd"
+    1 0 then "x transformed odd, y transformed even"
+    1 1 then "both transformed odd";
+
+/* Test coordinate classification */
+coord1 : classify_coordinates 1 1;
+..out coord1; 
\ No newline at end of file