this repo has no description
at develop 827 B view raw
1/*** 2!Test 3solvers: [gecode, chuffed] 4options: 5 all_solutions: true 6expected: !Result 7 solution: !SolutionSet 8 - !Solution 9 x: 1 10 y: null 11 p: false 12 a: 1 13 b: null 14 c: null 15 - !Solution 16 x: null 17 y: 1 18 p: false 19 a: 1 20 b: 1 21 c: null 22 - !Solution 23 x: null 24 y: 1 25 p: true 26 a: null 27 b: null 28 c: null 29 - !Solution 30 x: 1 31 y: null 32 p: true 33 a: null 34 b: 1 35 c: null 36 status: ALL_SOLUTIONS 37***/ 38 39% Test various if-then-else cases with opt 40 41var opt 1..1: x :: add_to_output; 42var opt 1..1: y :: add_to_output; 43 44var bool: p :: add_to_output; 45 46var opt int: a :: add_to_output = if p then <> else 1 endif; 47var opt int: b :: add_to_output = if p then x else y endif; 48 49bool: q = true; 50opt int: c :: add_to_output = if q then <> else 1 endif; 51 52constraint not (x = y);