@@ -30,16 +30,25 @@ function test_container()
3030
3131 keys = [:a, :b]
3232
33- con_ref = @constraint(model, [i in keys], x + d1[i] >= d2[i], container = ParametrizedArray)
33+ con_ref = @constraint(
34+ model,
35+ [i in keys],
36+ x + d1[i] >= d2[i],
37+ container = ParametrizedArray
38+ )
3439 con = constraint_object(con_ref. constraint)
3540 @test con isa IteratedConstraint
3641 con_it_expr = jump_function(con)
3742 @test con_it_expr isa ExprGenerator
3843 con_expr = con_it_expr. expr
39- @test sprint(show, con_ref) == " ParametrizedArray(((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0, Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]), Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]) ∈ MathOptInterface.Nonnegatives(4), (iterator([:a, :b]),))"
40- @test sprint(show, MIME" text/latex" (), con_ref) == " ParametrizedArray(((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0, Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]), Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]) ∈ MathOptInterface.Nonnegatives(4), (iterator([:a, :b]),))"
41- @test sprint(show, con_expr) == " ((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0"
42- @test sprint(show, MIME" text/latex" (), con_expr) == " \$ {\\ left({\\ left({x} + {\\ left(IteratorIndex(1, 1)\\ right)}\\ right)} - {\\ left(IteratorIndex(2, 2)\\ right)}\\ right)} - {0.0} \$ "
44+ @test sprint(show, con_ref) ==
45+ " ParametrizedArray(((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0, Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]), Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]) ∈ MathOptInterface.Nonnegatives(4), (iterator([:a, :b]),))"
46+ @test sprint(show, MIME" text/latex" (), con_ref) ==
47+ " ParametrizedArray(((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0, Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]), Iterator(2, [-1.0, 1.0, 3.141592653589793, 0.0]) ∈ MathOptInterface.Nonnegatives(4), (iterator([:a, :b]),))"
48+ @test sprint(show, con_expr) ==
49+ " ((x + (IteratorIndex(1, 1))) - (IteratorIndex(2, 2))) - 0.0"
50+ @test sprint(show, MIME" text/latex" (), con_expr) ==
51+ " \$ {\\ left({\\ left({x} + {\\ left(IteratorIndex(1, 1)\\ right)}\\ right)} - {\\ left(IteratorIndex(2, 2)\\ right)}\\ right)} - {0.0} \$ "
4352
4453 i = GenOpt. iterator(keys)
4554 expr = x + d1[i] - d2[i]
0 commit comments