Skip to content

Commit a1df983

Browse files
committed
improve testing
1 parent cc39d5d commit a1df983

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/testBlocks.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ function VSDTestBlock!(fg, v1)
573573
# Bulk copy update x0
574574
@test updateVariableSolverData!(fg, [v1], :default) == nothing
575575

576-
altVnd = deepcopy(vnd)
576+
altVnd = vnd |> deepcopy
577+
keepVnd = getSolverData(getVariable(fg, :a), :parametric) |> deepcopy
577578
altVnd.inferdim = -99.0
578579
retVnd = updateVariableSolverData!(fg, :a, altVnd, :parametric, false, [:inferdim;])
579580
@test retVnd == altVnd
@@ -586,7 +587,10 @@ function VSDTestBlock!(fg, v1)
586587
@test retVnd != altVnd
587588

588589
# restore without copy
589-
@test updateVariableSolverData!(fg, :a, vnd, :parametric, false, [:inferdim;]) == vnd
590+
# @show vnd.inferdim
591+
@test updateVariableSolverData!(fg, :a, keepVnd, :parametric, false, [:inferdim;:bw]) == vnd
592+
@test getSolverData(getVariable(fg, :a), :parametric).inferdim != altVnd.inferdim
593+
@test getSolverData(getVariable(fg, :a), :parametric).bw != altVnd.bw
590594

591595
# Delete parametric from v1
592596
@test deleteVariableSolverData!(fg, :a, :parametric) == vnd

0 commit comments

Comments
 (0)