diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_coord_only.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_coord_only.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_coord_only.txt b/js/scripting-lang/scratch_tests/test_coord_only.txt new file mode 100644 index 0000000..390e843 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_coord_only.txt @@ -0,0 +1,13 @@ +/* Test just the 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 |