Debian Codegraph @

tests/spec/unit/globals/all_equal/globals_all_equal_int.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 x: [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
7 ***/
8
9 % Test the integer all_equal global constraint.
10
11 include "all_equal.mzn";
12
13 array[1..10] of var 1..5: x;
14
15 constraint all_equal([]);
16 constraint all_equal([5, 5, 5, 5]);
17 constraint x[1] = 5;
18 constraint all_equal(x);
19 constraint all_equal([1, 2, 3]) == false;
20
21 solve satisfy;
22
23 output ["x = array1d(1..10, ", show(x), ");\n"];