@@ -17,6 +17,7 @@ include("utils.jl")
1717AOCoptimizer. MOI. init ()
1818
1919const aoc_moi = AOCoptimizer. MOI
20+ const MOI = MathOptInterface
2021
2122@testset verbose= verbose " Test simple JuMP problems" begin
2223 @testset " Test simple QUMO" begin
7677 end
7778end
7879
80+ #=
81+ =#
82+
83+ const OPTIMIZER = MOI. instantiate (
84+ MOI. OptimizerWithAttributes (
85+ aoc_moi. Optimizer[],
86+ MOI. Silent () => true ,
87+ MOI. TimeLimitSec () => 1.0 ,
88+ ),
89+ )
90+
91+ const BRIDGED = MOI. instantiate (
92+ MOI. OptimizerWithAttributes (
93+ aoc_moi. Optimizer[],
94+ MOI. Silent () => true ,
95+ MOI. TimeLimitSec () => 1.0 ,
96+ ),
97+ with_bridge_type = Float64,
98+ )
99+
100+ const CONFIG = MOI. Test. Config (
101+ # Modify tolerances as necessary.
102+ atol = 1e-6 ,
103+ rtol = 1e-6 ,
104+ # Use MOI.LOCALLY_SOLVED for local solvers.
105+ optimal_status = MOI. LOCALLY_SOLVED,
106+ # Pass attributes or MOI functions to `exclude` to skip tests that
107+ # rely on this functionality.
108+ exclude = Any[MOI. VariableName, MOI. delete],
109+ )
110+
111+ function run_moi_tests ()
112+ MOI. Test. runtests (
113+ BRIDGED,
114+ CONFIG,
115+ exclude = [
116+ " test_attribute_RawStatusString" ,
117+ " test_attribute_SolveTimeSec" ,
118+
119+ " test_HermitianPSDCone_" ,
120+ " test_NormNuclearCone_" ,
121+ " test_NormSpectralCone_" ,
122+ " test_basic_ScalarAffineFunction_" ,
123+ " test_basic_ScalarQuadraticFunction_" ,
124+ " test_basic_ScalarNonlinearFunction_" ,
125+ " test_basic_Vector" ,
126+
127+ " test_linear_" ,
128+ " test_nonlinear_" ,
129+ " test_conic_" ,
130+ " test_quadratic_" ,
131+ " test_constraint_" ,
132+ " test_objective_" ,
133+ " test_multiobjective_" ,
134+ " test_cpsat_" ,
135+ " test_infeasible_" ,
136+ " test_modification_" ,
137+ " test_solve_" ,
138+
139+ r" test_variable_solve.*bound" ,
140+ ],
141+ # This argument is useful to prevent tests from failing on future
142+ # releases of MOI that add new tests. Don't let this number get too far
143+ # behind the current MOI release though. You should periodically check
144+ # for new tests to fix bugs and implement new features.
145+ exclude_tests_after = v " 1.28.1" ,
146+ )
147+
148+ return nothing
149+ end
150+
151+ @testset " MathOptInterface Test Suite" begin
152+ run_moi_tests ()
153+ end
154+
79155end # module
0 commit comments