diff --git a/test/algorithms/Dichotomy.jl b/test/algorithms/Dichotomy.jl index a77bea7..9d4d41f 100644 --- a/test/algorithms/Dichotomy.jl +++ b/test/algorithms/Dichotomy.jl @@ -404,7 +404,7 @@ function test_vector_of_variables_objective() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.add_constraint(model, sum(1.0 * xi for xi in x), MOI.GreaterThan(1.0)) MOI.optimize!(model) - MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL + @test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL return end diff --git a/test/algorithms/DominguezRios.jl b/test/algorithms/DominguezRios.jl index 067a060..f79efed 100644 --- a/test/algorithms/DominguezRios.jl +++ b/test/algorithms/DominguezRios.jl @@ -638,6 +638,15 @@ function test_issue_105() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.optimize!(model) @test MOI.get(model, MOI.ResultCount()) == 6 + y = [MOI.get(model, MOI.ObjectiveValue(i)) for i in 1:6] + @test sort!(y) == [ + [2380.0, 81.0, 18.0], + [2440.0, 78.0, 18.0], + [2500.0, 75.0, 18.0], + [2560.0, 72.0, 18.0], + [2620.0, 69.0, 18.0], + [2680.0, 66.0, 18.0], + ] return end diff --git a/test/algorithms/EpsilonConstraint.jl b/test/algorithms/EpsilonConstraint.jl index 86f550c..b733c37 100644 --- a/test/algorithms/EpsilonConstraint.jl +++ b/test/algorithms/EpsilonConstraint.jl @@ -470,7 +470,7 @@ function test_vector_of_variables_objective() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.add_constraint(model, sum(1.0 * xi for xi in x), MOI.GreaterThan(1.0)) MOI.optimize!(model) - MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL + @test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL return end diff --git a/test/algorithms/Hierarchical.jl b/test/algorithms/Hierarchical.jl index c6d1279..ab71063 100644 --- a/test/algorithms/Hierarchical.jl +++ b/test/algorithms/Hierarchical.jl @@ -126,7 +126,7 @@ function test_vector_of_variables_objective() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.add_constraint(model, sum(1.0 * xi for xi in x), MOI.GreaterThan(1.0)) MOI.optimize!(model) - MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL + @test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL return end diff --git a/test/algorithms/KirlikSayin.jl b/test/algorithms/KirlikSayin.jl index 904eb02..5242b4c 100644 --- a/test/algorithms/KirlikSayin.jl +++ b/test/algorithms/KirlikSayin.jl @@ -642,6 +642,15 @@ function test_issue_105() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.optimize!(model) @test MOI.get(model, MOI.ResultCount()) == 6 + y = [MOI.get(model, MOI.ObjectiveValue(i)) for i in 1:6] + @test sort!(y) == [ + [2380.0, 81.0, 18.0], + [2440.0, 78.0, 18.0], + [2500.0, 75.0, 18.0], + [2560.0, 72.0, 18.0], + [2620.0, 69.0, 18.0], + [2680.0, 66.0, 18.0], + ] return end diff --git a/test/algorithms/Lexicographic.jl b/test/algorithms/Lexicographic.jl index a9f8ed3..cf99f0a 100644 --- a/test/algorithms/Lexicographic.jl +++ b/test/algorithms/Lexicographic.jl @@ -165,7 +165,7 @@ function test_vector_of_variables_objective() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.add_constraint(model, sum(1.0 * xi for xi in x), MOI.GreaterThan(1.0)) MOI.optimize!(model) - MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL + @test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL return end diff --git a/test/algorithms/TambyVanderpooten.jl b/test/algorithms/TambyVanderpooten.jl index 33356ac..67b0a5e 100644 --- a/test/algorithms/TambyVanderpooten.jl +++ b/test/algorithms/TambyVanderpooten.jl @@ -659,6 +659,15 @@ function test_issue_105() MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f) MOI.optimize!(model) @test MOI.get(model, MOI.ResultCount()) == 6 + y = [MOI.get(model, MOI.ObjectiveValue(i)) for i in 1:6] + @test sort!(y) == [ + [2380.0, 81.0, 18.0], + [2440.0, 78.0, 18.0], + [2500.0, 75.0, 18.0], + [2560.0, 72.0, 18.0], + [2620.0, 69.0, 18.0], + [2680.0, 66.0, 18.0], + ] return end