tests/spec/unit/regression/bug337_mod.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | x: [false, true] |
| 7 | y: 0 |
| 8 | - !Result |
| 9 | solution: !Solution |
| 10 | x: [false, false] |
| 11 | y: 0 |
| 12 | ***/ |
| 13 | |
| 14 | % Test for bug #337 but with mod rather than div. |
| 15 | |
| 16 | array[1..2] of var bool: x; |
| 17 | var 0..0: y; |
| 18 | constraint not(x[1 mod y]); |
| 19 | solve satisfy; |
| 20 | output [ |
| 21 | "x = array1d(1..2, ", show(x), ";\n", |
| 22 | "y = ", show(y), ";\n" |
| 23 | ]; |