Debian Codegraph @

tests/spec/unit/regression/if_then_else_absent.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 expected:
5 - !Result
6 solution: !Solution
7 x: [null]
8 b: true
9 - !Result
10 solution: !Solution
11 x: [1]
12 b: false
13 ***/
14
15 % Test to ensure that if-then-else correctly handles equality with absent
16
17 array [1..1] of var opt 1..1: x;
18 var bool: b;
19
20 constraint if b then x[1] = <> else x[1] = 1 endif;