about summary refs log tree commit diff stats
path: root/js/scripting-lang/c/test_pattern_expressions.txt
blob: 1d6a35c34228630bdcf65193856b18fb6ca2f0b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
/* Test multi-value pattern expressions */
test_multi_expr : x y -> 
  when (x % 2) (y % 2) is
    0 0 then "both even"
    0 1 then "x even, y odd"
    1 0 then "x odd, y even"
    1 1 then "both odd";

result : test_multi_expr 4 5;
..assert result = "x even, y odd";