| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode, chuffed] |
| 4 |
expected: !Result |
| 5 |
status: ALL_SOLUTIONS |
| 6 |
solution: !SolutionSet |
| 7 |
- !Solution |
| 8 |
_output_item: | |
| 9 |
x = 1 |
| 10 |
y = 2 |
| 11 |
NO |
| 12 |
- !Solution |
| 13 |
_output_item: | |
| 14 |
x = 1 |
| 15 |
y = 2 |
| 16 |
YES |
| 17 |
|
| 18 |
options: |
| 19 |
all_solutions: true |
| 20 |
***/ |
| 21 |
|
| 22 |
% Test that test items work in output items. |
| 23 |
|
| 24 |
test bar(string: s) = s = "foo" /\ fix(b); |
| 25 |
|
| 26 |
var bool: b; |
| 27 |
var 1..2: x; |
| 28 |
var 1..2: y; |
| 29 |
constraint x < y; |
| 30 |
|
| 31 |
solve satisfy; |
| 32 |
|
| 33 |
output [ |
| 34 |
"x = ", show(x), "\n", |
| 35 |
"y = ", show(y), "\n", |
| 36 |
if bar("foo") then "YES" else "NO" endif, "\n" |
| 37 |
]; |