Skip to content

Commit

Permalink
Allow get to return non-nothing (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Dec 20, 2023
1 parent 010f846 commit 61baf23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Test/test_attribute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ function test_attribute_TimeLimitSec(model::MOI.AbstractOptimizer, ::Config)
MOI.set(model, MOI.TimeLimitSec(), 1.0)
@test MOI.get(model, MOI.TimeLimitSec()) == 1.0
MOI.set(model, MOI.TimeLimitSec(), nothing)
@test _get_default(model) === nothing
reset_value = _get_default(model)
@test reset_value === nothing || reset_value == value
MOI.set(model, MOI.TimeLimitSec(), value)
return
end
Expand Down

0 comments on commit 61baf23

Please sign in to comment.