Skip to content

Commit 821b4c4

Browse files
test: test correct costs and constraints in @mtkmodel metadata
1 parent f1fe0ca commit 821b4c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/model_parsing.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,4 +1042,6 @@ end
10421042
@test isequal(constrs[1], EvalAt(0.3)(ex.x) ~ 3)
10431043
@test isequal(constrs[2], ex.y 4)
10441044
@test ModelingToolkit.get_consolidate(ex)([1, 2], [3, 4]) 8 + log(2)
1045+
@test Example.structure[:constraints] == ["(EvalAt(0.3))(x) ~ 3", "y ≲ 4"]
1046+
@test Example.structure[:costs] == ["x + y", "(EvalAt(1))(y) ^ 2"]
10451047
end

0 commit comments

Comments
 (0)