Skip to content

Commit ce5fda0

Browse files
authored
Use regex for tests (#151)
1 parent 852579a commit ce5fda0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/MOI_wrapper.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ function test_runtests()
3030
@test model.optimizer.model.model_cache isa
3131
MOI.Utilities.UniversalFallback{ECOS.OptimizerCache}
3232
MOI.set(model, MOI.Silent(), true)
33-
exclude = String[
33+
exclude = [
3434
# ZerosBridge does not support ConstraintDual. These are tested below in
3535
# test_runtests_ZerosBridge
36-
"test_conic_RotatedSecondOrderCone_INFEASIBLE_2",
37-
"test_conic_linear_VectorOfVariables_2",
38-
"test_linear_integration",
39-
"test_quadratic_constraint_GreaterThan",
40-
"test_quadratic_constraint_LessThan",
36+
r"test_conic_RotatedSecondOrderCone_INFEASIBLE_2$",
37+
r"test_conic_linear_VectorOfVariables_2$",
38+
r"test_linear_integration$",
39+
r"test_quadratic_constraint_GreaterThan$",
40+
r"test_quadratic_constraint_LessThan$",
4141
]
4242
if Sys.WORD_SIZE == 32
4343
# These tests fail on x86 Linux, returning ITERATION_LIMIT instead of
4444
# proving {primal,dual}_INFEASIBLE.
45-
push!(exclude, "test_conic_linear_INFEASIBLE")
46-
push!(exclude, "test_solve_TerminationStatus_DUAL_INFEASIBLE")
45+
push!(exclude, r"test_conic_linear_INFEASIBLE$")
46+
push!(exclude, r"test_solve_TerminationStatus_DUAL_INFEASIBLE$")
4747
end
4848
MOI.Test.runtests(
4949
model,
@@ -82,13 +82,13 @@ function test_runtests_ZerosBridge()
8282
MOI.ObjectiveBound,
8383
],
8484
),
85-
include = String[
85+
include = [
8686
# ZerosBridge does not support ConstraintDual
87-
"test_conic_RotatedSecondOrderCone_INFEASIBLE_2",
88-
"test_conic_linear_VectorOfVariables_2",
89-
"test_linear_integration",
90-
"test_quadratic_constraint_GreaterThan",
91-
"test_quadratic_constraint_LessThan",
87+
r"test_conic_RotatedSecondOrderCone_INFEASIBLE_2",
88+
r"test_conic_linear_VectorOfVariables_2",
89+
r"test_linear_integration",
90+
r"test_quadratic_constraint_GreaterThan",
91+
r"test_quadratic_constraint_LessThan",
9292
],
9393
)
9494
return

0 commit comments

Comments
 (0)