Skip to content

Commit 99a071d

Browse files
authored
Apply suggestions from code review
1 parent 7627b6a commit 99a071d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/MOI_wrapper.jl

+3
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ function test_quadratic_modification_from_affine()
482482
x = MOI.add_variable(model)
483483
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
484484
f = 2.0 * x + 1.0
485+
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
485486
attr = MOI.ObjectiveFunction{typeof(f)}()
486487
MOI.set(model, attr, f)
487488
MOI.optimize!(model)
@@ -500,6 +501,7 @@ function test_quadratic_off_diagonal_modification()
500501
x = MOI.add_variables(model, 2)
501502
MOI.add_constraint.(model, x, MOI.GreaterThan.([2.0, 3.0]))
502503
f = 4.0 * x[1] * x[1] + 2.0 * x[1] * x[2] + 2.0 * x[2] * x[2]
504+
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
503505
attr = MOI.ObjectiveFunction{typeof(f)}()
504506
MOI.set(model, attr, f)
505507
MOI.optimize!(model)
@@ -524,6 +526,7 @@ function test_quadratic_diagonal_modification()
524526
x = MOI.add_variable(model)
525527
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
526528
f = 3.0 * x * x + 2.0 * x + 1.0
529+
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
527530
attr = MOI.ObjectiveFunction{typeof(f)}()
528531
MOI.set(model, attr, f)
529532
MOI.optimize!(model)

0 commit comments

Comments
 (0)