Skip to content

Commit d67d58b

Browse files
committed
remove tests for LessThan(Inf) and GreaterThan(Inf)
1 parent 83d9510 commit d67d58b

File tree

2 files changed

+1
-51
lines changed

2 files changed

+1
-51
lines changed

src/Test/UnitTests/constraints.jl

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -515,54 +515,6 @@ function solve_zero_one_with_bounds_3(model::MOI.ModelLike, config::TestConfig)
515515
end
516516
unittests["solve_zero_one_with_bounds_3"] = solve_zero_one_with_bounds_3
517517

518-
function solve_constrs_with_inf_bounds(model::MOI.ModelLike, config::TestConfig)
519-
MOI.empty!(model)
520-
x = MOI.add_variable(model)
521-
y = MOI.add_variable(model)
522-
objective_function = MOI.ScalarAffineFunction(
523-
[MOI.ScalarAffineTerm(1.0, x), MOI.ScalarAffineTerm(-1.0, y)],
524-
0.0
525-
)
526-
MOI.set(
527-
model,
528-
MOI.ObjectiveFunction{typeof(objective_function)}(),
529-
objective_function,
530-
)
531-
MOI.set(model, MOI.ObjectiveSense(), MOI.MAX_SENSE)
532-
533-
c1 = MOI.add_constraint(
534-
model,
535-
MOI.SingleVariable(x),
536-
MOI.LessThan{Float64}(1.0)
537-
)
538-
c2 = MOI.add_constraint(
539-
model,
540-
MOI.SingleVariable(x),
541-
MOI.GreaterThan{Float64}(-Inf)
542-
)
543-
c3 = MOI.add_constraint(
544-
model,
545-
MOI.SingleVariable(y),
546-
MOI.LessThan{Float64}(Inf)
547-
)
548-
c4 = MOI.add_constraint(
549-
model,
550-
MOI.SingleVariable(y),
551-
MOI.GreaterThan{Float64}(-1.0)
552-
)
553-
554-
@test MOI.is_valid(model, c2)
555-
@test MOI.is_valid(model, c3)
556-
557-
return test_model_solution(
558-
model,
559-
config;
560-
objective_value = 2.0,
561-
variable_primal = [(x, 1.0), (y, -1.0)],
562-
)
563-
end
564-
unittests["solve_constrs_with_inf_bounds"] = solve_constrs_with_inf_bounds
565-
566518
function solve_one_sided_intervals(model::MOI.ModelLike, config::TestConfig)
567519
MOI.empty!(model)
568520
MOIU.loadfromstring!(

test/Test/unit.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ end
4545
"solve_zero_one_with_bounds_1",
4646
"solve_zero_one_with_bounds_2",
4747
"solve_zero_one_with_bounds_3",
48-
"solve_constrs_with_inf_bounds",
4948
"solve_one_sided_intervals",
5049
"solve_unbounded_model",
5150
"solve_single_variable_dual_min",
@@ -348,7 +347,7 @@ end
348347
MOIT.solve_zero_one_with_bounds_3(mock, config)
349348
end
350349

351-
@testset "solve_constrs_inf_bounds" begin
350+
@testset "solve_one_sided_intervals" begin
352351
MOIU.set_mock_optimize!(mock,
353352
(mock::MOIU.MockOptimizer) -> begin
354353
MOIU.mock_optimize!(
@@ -361,7 +360,6 @@ end
361360
)
362361
end
363362
)
364-
MOIT.solve_constrs_with_inf_bounds(mock, config)
365363
MOIT.solve_one_sided_intervals(mock, config)
366364
end
367365

0 commit comments

Comments
 (0)