From 61baf23e9583800782772ec19a89a691cb4b6fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Wed, 20 Dec 2023 22:15:29 +0100 Subject: [PATCH] Allow get to return non-nothing (#2370) --- src/Test/test_attribute.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Test/test_attribute.jl b/src/Test/test_attribute.jl index 3c52ae4fa9..8b8ff0e2f9 100644 --- a/src/Test/test_attribute.jl +++ b/src/Test/test_attribute.jl @@ -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