Skip to content

Commit 0d2a8e1

Browse files
committed
Update
1 parent e80f34b commit 0d2a8e1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/problems.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,18 +443,17 @@ function test_problem_issue_105(model)
443443
end
444444

445445
function _test_vOptLib_instance(model, instance)
446-
root = joinpath(dirname(dirname(@__DIR__)), "instances")
446+
root = joinpath(dirname(@__DIR__), "instances")
447447
src = MOI.FileFormats.MOF.Model()
448448
MOI.read_from_file(src, joinpath(root, "models", instance * ".mof.json"))
449449
MOI.copy_to(model, src)
450450
MOI.optimize!(model)
451+
x = MOI.get(model, MOI.ListOfVariableIndices())
451452
solutions = JSON.parsefile(joinpath(root, "solutions", instance * ".json"))
452453
@test MOI.get(model, MOI.ResultCount()) == length(solutions)
453-
atol = 1e-6
454-
x = MOI.get(model, MOI.ListOfVariableIndices())
455454
for (i, sol) in enumerate(solutions)
456-
@test isapprox(MOI.get(model, MOI.VariablePrimal(i), x), sol["X"]; atol)
457-
@test isapprox(MOI.get(model, MOI.ObjectiveValue(i)), sol["Y"]; atol)
455+
@test (MOI.get(model, MOI.VariablePrimal(i), x), sol["X"]; atol = 1e-6)
456+
@test (MOI.get(model, MOI.ObjectiveValue(i)), sol["Y"]; atol = 1e-6)
458457
end
459458
return
460459
end

0 commit comments

Comments
 (0)