diff --git a/src/MOIWrapper.jl b/src/MOIWrapper.jl index 2b4d45d4..7134a1b7 100644 --- a/src/MOIWrapper.jl +++ b/src/MOIWrapper.jl @@ -65,6 +65,8 @@ function Optimizer(;kwargs...) return model end +MOI.get(::Optimizer, ::MOI.SolverName) = "Gurobi" + function MOI.empty!(model::Optimizer) MOI.empty!(model, model.env) setparam!(model.inner, "InfUnbdInfo", 1) diff --git a/test/MOIWrapper.jl b/test/MOIWrapper.jl index 9c465264..d1905df9 100644 --- a/test/MOIWrapper.jl +++ b/test/MOIWrapper.jl @@ -79,6 +79,9 @@ end end @testset "ModelLike tests" begin solver = Gurobi.Optimizer() + + @test MOI.get(solver, MOI.SolverName()) == "Gurobi" + @testset "nametest" begin MOIT.nametest(solver) end