Debian Codegraph @

tests/spec/unit/globals/roots/test_roots.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 x: 1
7 ***/
8
9 var 1..1: x ::add_to_output; % Just so we have something to print out.
10
11 include "roots.mzn";
12
13 constraint roots([], {}, {});
14 constraint roots([1, 2, 3], {}, {});
15 constraint roots([1, 3, 1, 2, 3], {2, 4, 5}, {2, 3, 8});
16 constraint roots([1, 1, 1], {1, 2, 3}, {1, 2});
17
18 solve satisfy;
19
20 output [
21 "x = ", show(x), ";\n"
22 ];