tests/spec/unit/output/output_sections_5.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode] |
| 4 | expected: !Result |
| 5 | solution: !Solution |
| 6 | _output_item: "x = 10\ny = 1\n" |
| 7 | ***/ |
| 8 | |
| 9 | var 1..10: x :: foo; |
| 10 | var 1..5: y; |
| 11 | |
| 12 | annotation foo(var int: y :: annotated_expression) = let { |
| 13 | constraint output_to_section("default", "x = \(y)\n"); |
| 14 | } in empty_annotation; |
| 15 | |
| 16 | solve maximize x; |
| 17 | |
| 18 | output ["y = \(y)\n"]; |