Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed May 12, 2024
1 parent 8b91af7 commit 039ad77
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Bridges/Bridges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ function runtests(
Test.@test all(isnothing, MOI.get(model, attr, x))
primal_start = fill(constraint_start, length(x))
MOI.set(model, attr, x, primal_start)
Test.@test MOI.get(model, attr, x) primal_start
if !isempty(x)

Check warning on line 286 in src/Bridges/Bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Bridges.jl#L286

Added line #L286 was not covered by tests
# ≈ does not work if x is empty because the return of get is Any[]
Test.@test MOI.get(model, attr, x) primal_start

Check warning on line 288 in src/Bridges/Bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Bridges.jl#L288

Added line #L288 was not covered by tests
end
end
# Test ConstraintPrimalStart and ConstraintDualStart
for (F, S) in MOI.get(model, MOI.ListOfConstraintTypesPresent())
Expand All @@ -295,7 +298,11 @@ function runtests(
Test.@test MOI.get(model, attr, ci) === nothing
start = _fake_start(constraint_start, set)
MOI.set(model, attr, ci, start)
Test.@test MOI.get(model, attr, ci) start
if !isempty(ci)

Check warning on line 301 in src/Bridges/Bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Bridges.jl#L301

Added line #L301 was not covered by tests
# ≈ does not work if ci is empty because the return of
# get is Any[]
Test.@test MOI.get(model, attr, ci) start

Check warning on line 304 in src/Bridges/Bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Bridges.jl#L304

Added line #L304 was not covered by tests
end
end
end
end
Expand Down

0 comments on commit 039ad77

Please sign in to comment.