tests/spec/unit/compilation/time_limit.mzn
raw| 1 | /*** |
| 2 | --- !Test |
| 3 | type: compile |
| 4 | solvers: [gecode] |
| 5 | options: |
| 6 | --time-limit: 1 |
| 7 | expected: !Error |
| 8 | message: 'time limit reached' |
| 9 | ***/ |
| 10 | |
| 11 | % In mzn2fzn mode, timeouts throw an error (so that the timeout can be detected) |
| 12 | |
| 13 | int: n = 10000; |
| 14 | array [1..n] of var 1..n: x; |
| 15 | constraint forall (i, j in 1..n where i != j) (x[i] != x[j]); |