Skip to content

Commit 93eed79

Browse files
committed
Add LRO tests
1 parent a58ed0f commit 93eed79

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

test/runtests.jl

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,9 @@ import Random
1313
import SDPLR
1414

1515
function test_runtests()
16-
optimizer = SDPLR.Optimizer()
17-
MOI.set(optimizer, MOI.Silent(), true)
18-
MOI.set(optimizer, MOI.RawOptimizerAttribute("timelim"), 10)
19-
model = MOI.Bridges.full_bridge_optimizer(
20-
MOI.Utilities.CachingOptimizer(
21-
MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
22-
optimizer,
23-
),
24-
Float64,
25-
)
16+
model = MOI.instantiate(SDPLR.Optimizer, with_bridge_type = Float64, with_cache_type = Float64)
17+
MOI.set(model, MOI.Silent(), true)
18+
MOI.set(model, MOI.RawOptimizerAttribute("timelim"), 10)
2619
config = MOI.Test.Config(
2720
rtol = 1e-1,
2821
atol = 1e-1,
@@ -53,6 +46,30 @@ function test_runtests()
5346
return
5447
end
5548

49+
function test_LRO_runtests()
50+
model = MOI.instantiate(SDPLR.Optimizer, with_bridge_type = Float64, with_cache_type = Float64)
51+
MOI.set(model, MOI.Silent(), true)
52+
MOI.set(model, MOI.RawOptimizerAttribute("timelim"), 10)
53+
config = MOI.Test.Config(
54+
rtol = 1e-1,
55+
atol = 1e-1,
56+
exclude = Any[
57+
MOI.ConstraintBasisStatus,
58+
MOI.VariableBasisStatus,
59+
MOI.ConstraintName,
60+
MOI.VariableName,
61+
MOI.ObjectiveBound,
62+
MOI.SolverVersion,
63+
],
64+
optimal_status = MOI.LOCALLY_SOLVED,
65+
)
66+
LRO.Test.runtests(
67+
model,
68+
config,
69+
)
70+
return
71+
end
72+
5673
function test_RawOptimizerAttribute_UnsupportedAttribute()
5774
model = SDPLR.Optimizer()
5875
attr = MOI.RawOptimizerAttribute("FooBarBaz")

0 commit comments

Comments
 (0)