@@ -24,13 +24,16 @@ function runtests()
24
24
return
25
25
end
26
26
27
- const _EXCLUDE_NONLINEAR_OBJECTIVES = [
28
- # SCIP does not support nonlinear objective functions.
29
- r" ^test_nonlinear_hs071_NLPBlockDual$" ,
30
- r" ^test_nonlinear_invalid$" ,
31
- r" ^test_nonlinear_objective$" ,
32
- r" ^test_nonlinear_objective_and_moi_objective_test$" ,
33
- ]
27
+ const CONFIG = MOI. Test. Config (;
28
+ atol= 5e-3 ,
29
+ rtol= 1e-4 ,
30
+ exclude= Any[
31
+ MOI. ConstraintDual,
32
+ MOI. DualObjectiveValue,
33
+ MOI. VariableBasisStatus,
34
+ MOI. ConstraintBasisStatus,
35
+ ],
36
+ )
34
37
35
38
function test_runtests_cached ()
36
39
model = MOI. Bridges. full_bridge_optimizer (
@@ -41,66 +44,22 @@ function test_runtests_cached()
41
44
Float64,
42
45
)
43
46
MOI. set (model, MOI. Silent (), true )
44
- MOI. Test. runtests (
45
- model,
46
- MOI. Test. Config (;
47
- atol= 5e-3 ,
48
- rtol= 1e-4 ,
49
- exclude= Any[
50
- MOI. ConstraintDual,
51
- MOI. DualObjectiveValue,
52
- MOI. VariableBasisStatus,
53
- MOI. ConstraintBasisStatus,
54
- ],
55
- );
56
- exclude= _EXCLUDE_NONLINEAR_OBJECTIVES,
57
- )
47
+ MOI. Test. runtests (model, CONFIG)
58
48
return
59
49
end
60
50
61
51
function test_runtests_bridged ()
62
52
model = MOI. Bridges. full_bridge_optimizer (SCIP. Optimizer (), Float64)
63
53
MOI. set (model, MOI. Silent (), true )
64
- MOI. Test. runtests (
65
- model,
66
- MOI. Test. Config (;
67
- atol= 5e-3 ,
68
- rtol= 1e-4 ,
69
- exclude= Any[
70
- MOI. ConstraintDual,
71
- MOI. DualObjectiveValue,
72
- MOI. VariableBasisStatus,
73
- MOI. ConstraintBasisStatus,
74
- ],
75
- );
76
- warn_unsupported= false ,
77
- exclude= vcat (
78
- _EXCLUDE_NONLINEAR_OBJECTIVES,
79
- # TODO (odow): bugs to fix
80
- r" ^test_model_delete$" ,
81
- ),
82
- )
54
+ # TODO (odow): bugs to fix
55
+ MOI. Test. runtests (model, CONFIG; exclude= [r" ^test_model_delete$" ])
83
56
return
84
57
end
85
58
86
59
function test_runtests_direct ()
87
60
model = SCIP. Optimizer ()
88
61
MOI. set (model, MOI. Silent (), true )
89
- MOI. Test. runtests (
90
- model,
91
- MOI. Test. Config (;
92
- atol= 5e-3 ,
93
- rtol= 1e-4 ,
94
- exclude= Any[
95
- MOI. ConstraintDual,
96
- MOI. DualObjectiveValue,
97
- MOI. VariableBasisStatus,
98
- MOI. ConstraintBasisStatus,
99
- ],
100
- );
101
- warn_unsupported= false ,
102
- exclude= _EXCLUDE_NONLINEAR_OBJECTIVES,
103
- )
62
+ MOI. Test. runtests (model, CONFIG)
104
63
return
105
64
end
106
65
0 commit comments