Skip to content

Commit

Permalink
reenable tests and fix getfield
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscoey committed Nov 30, 2021
1 parent 1b81dd7 commit 44bc5c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/MathOptInterface/wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 15 additions & 15 deletions test/runmoitests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 44bc5c3

Please sign in to comment.