From e4e75a3a0df752dbc015e2ddbf94b0e72400fb45 Mon Sep 17 00:00:00 2001 From: pedromxavier Date: Fri, 24 Nov 2023 15:52:11 -0500 Subject: [PATCH] Fix attribute access --- test/integration/interface.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/integration/interface.jl b/test/integration/interface.jl index f3f24e6..cd1f919 100644 --- a/test/integration/interface.jl +++ b/test/integration/interface.jl @@ -299,8 +299,16 @@ function test_interface_moi() let virtual_model = model.model.optimizer # MOI Attributes @test MOI.get(model, MOI.ResultCount()) > 0 - @test MOI.get(model, MOI.SolveTime()) > 0.0 + @test MOI.get(model, MOI.SolveTimeSec()) > 0.0 @test MOI.get(model, MOI.TerminationStatus()) isa MOI.TerminationStatusCode + @test MOI.get(model, MOI.RawStatusString()) isa String + + # MOI Variable Attributes + @test MOI.get(model, MOI.PrimalStatus()) isa MOI.ResultStatusCode + @test MOI.get(model, MOI.DualStatus()) isa MOI.ResultStatusCode + @test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[1]) <= 1.0 + @test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[2]) <= 1.0 + @test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[3]) <= 1.0 # ToQUBO Attribtues @test MOI.get(model, Attributes.Optimization()) == 3