From 44bc5c39b2d9e413c65dcebe837e5b57010fcf8e Mon Sep 17 00:00:00 2001 From: Chris Coey Date: Tue, 30 Nov 2021 01:08:17 -0500 Subject: [PATCH] reenable tests and fix getfield --- src/MathOptInterface/wrapper.jl | 4 ++-- test/runmoitests.jl | 30 +++++++++++++++--------------- test/runtests.jl | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/MathOptInterface/wrapper.jl b/src/MathOptInterface/wrapper.jl index bd79ad1ed..882ecf053 100644 --- a/src/MathOptInterface/wrapper.jl +++ b/src/MathOptInterface/wrapper.jl @@ -291,11 +291,11 @@ MOI.get(opt::Optimizer, ::MOI.RawStatusString) = string(opt.solver.status) MOI.get(opt::Optimizer, ::MOI.BarrierIterations) = opt.solver.num_iters function MOI.set(opt::Optimizer, param::MOI.RawOptimizerAttribute, value) - return setfield!(opt.solver, Symbol(param.name), value) + return setproperty!(opt.solver, Symbol(param.name), value) end function MOI.get(opt::Optimizer, param::MOI.RawOptimizerAttribute) - return getfield(opt.solver, Symbol(param.name)) + return getproperty(opt.solver, Symbol(param.name)) end function MOI.get(opt::Optimizer, ::MOI.TerminationStatus) diff --git a/test/runmoitests.jl b/test/runmoitests.jl index 865e51486..4a80dfacc 100644 --- a/test/runmoitests.jl +++ b/test/runmoitests.jl @@ -12,20 +12,20 @@ include(joinpath(@__DIR__, "moicones.jl")) @testset "MathOptInterface wrapper tests" begin -# @testset "MOI cone tests" begin -# println("starting MOI wrapper cone tests") -# real_types = [ -# Float64, -# # Float32, -# BigFloat, -# ] -# for T in real_types -# @testset "$T" begin -# println(T, " ...") -# test_moi_cones(T) -# end -# end -# end +@testset "MOI cone tests" begin + println("starting MOI wrapper cone tests") + real_types = [ + Float64, + # Float32, + BigFloat, + ] + for T in real_types + @testset "$T" begin + println(T, " ...") + test_moi_cones(T) + end + end +end @testset "MOI.Test tests" begin println("\nstarting MOI.Test tests") @@ -66,7 +66,7 @@ include(joinpath(@__DIR__, "moicones.jl")) "test_model_LowerBoundAlreadySet", "test_model_UpperBoundAlreadySet", ] - includes = String["test_conic"] + includes = String[] MOI.Test.runtests(model, config, include = includes, exclude = excludes) end diff --git a/test/runtests.jl b/test/runtests.jl index f7abe1f68..85f995a71 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,9 +7,9 @@ using Printf using Hypatia test_files = [ - # "polyutils", - # "cone", - # "native", + "polyutils", + "cone", + "native", "moi", # "examples", # CI runs examples separately # require optional dependencies: