tests/spec/unit/regression/bug287.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | q: [1, 2] |
| 7 | ***/ |
| 8 | |
| 9 | % Regression test for bug #287: the first solution violated the alldifferent |
| 10 | % constraint. |
| 11 | |
| 12 | include "alldifferent.mzn"; |
| 13 | |
| 14 | int: n = 2; |
| 15 | array [1..n] of var 1..n: q; |
| 16 | |
| 17 | constraint alldifferent(q) :: domain; |
| 18 | constraint q[1] != q[2] + 1; |
| 19 | |
| 20 | solve satisfy; |
| 21 | |
| 22 | output [show(q)]; |
| 23 |