Skip to content

Commit e24e2f8

Browse files
authored
[Test] update version_added (#2691)
1 parent 5dc6119 commit e24e2f8

11 files changed

+302
-4
lines changed

src/Test/test_attribute.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ function setup_test(
226226
return
227227
end
228228

229+
version_added(::typeof(test_attribute_ObjectiveLimit)) = v"1.20.0"
230+
229231
function test_attribute_SolutionLimit(model::MOI.AbstractOptimizer, ::Config)
230232
@requires MOI.supports(model, MOI.SolutionLimit())
231233
# Get the current value to restore it at the end of the test
@@ -252,6 +254,8 @@ function setup_test(
252254
return
253255
end
254256

257+
version_added(::typeof(test_attribute_SolutionLimit)) = v"1.21.0"
258+
255259
function test_attribute_NodeLimit(model::MOI.AbstractOptimizer, ::Config)
256260
@requires MOI.supports(model, MOI.NodeLimit())
257261
# Get the current value to restore it at the end of the test
@@ -278,6 +282,8 @@ function setup_test(
278282
return
279283
end
280284

285+
version_added(::typeof(test_attribute_NodeLimit)) = v"1.32.0"
286+
281287
"""
282288
test_attribute_AbsoluteGapTolerance(model::MOI.AbstractOptimizer, config::Config)
283289
@@ -311,6 +317,8 @@ function setup_test(
311317
return
312318
end
313319

320+
version_added(::typeof(test_attribute_AbsoluteGapTolerance)) = v"1.7.0"
321+
314322
"""
315323
test_attribute_RelativeGapTolerance(model::MOI.AbstractOptimizer, config::Config)
316324
@@ -344,6 +352,8 @@ function setup_test(
344352
return
345353
end
346354

355+
version_added(::typeof(test_attribute_RelativeGapTolerance)) = v"1.7.0"
356+
347357
"""
348358
test_attribute_after_empty(model::MOI.AbstractOptimizer, config::Config)
349359
@@ -381,3 +391,5 @@ function test_attribute_unsupported_constraint(model::MOI.ModelLike, ::Config)
381391
@test MOI.get(model, MOI.NumberOfConstraints{F,S}()) == Int64(0)
382392
return
383393
end
394+
395+
version_added(::typeof(test_attribute_unsupported_constraint)) = v"1.9.0"

src/Test/test_conic.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5017,6 +5017,14 @@ function setup_test(
50175017
return
50185018
end
50195019

5020+
function version_added(
5021+
::typeof(
5022+
test_conic_ScaledPositiveSemidefiniteConeTriangle_VectorAffineFunction,
5023+
),
5024+
)
5025+
return v"1.16.0"
5026+
end
5027+
50205028
"""
50215029
Problem SDP1 - sdo1 from MOSEK docs
50225030
From Mosek.jl/test/mathprogtestextra.jl, under license:
@@ -5859,6 +5867,10 @@ function setup_test(
58595867
return
58605868
end
58615869

5870+
function version_added(::typeof(test_conic_PositiveSemidefiniteConeTriangle_4))
5871+
return v"1.35.0"
5872+
end
5873+
58625874
"""
58635875
_test_det_cone_helper_ellipsoid(
58645876
model::MOI.ModelLike,

src/Test/test_cpsat.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ function setup_test(
4848
return
4949
end
5050

51+
version_added(::typeof(test_cpsat_AllDifferent)) = v"1.4.0"
52+
5153
"""
5254
test_cpsat_ReifiedAllDifferent(model::MOI.ModelLike, config::Config)
5355
@@ -153,6 +155,8 @@ function setup_test(
153155
return
154156
end
155157

158+
version_added(::typeof(test_cpsat_CountDistinct)) = v"1.4.0"
159+
156160
"""
157161
test_cpsat_CountBelongs(model::MOI.ModelLike, config::Config)
158162
@@ -200,6 +204,8 @@ function setup_test(
200204
return
201205
end
202206

207+
version_added(::typeof(test_cpsat_CountBelongs)) = v"1.4.0"
208+
203209
"""
204210
test_cpsat_CountAtLeast(model::MOI.ModelLike, config::Config)
205211
@@ -251,6 +257,8 @@ function setup_test(
251257
return
252258
end
253259

260+
version_added(::typeof(test_cpsat_CountAtLeast)) = v"1.4.0"
261+
254262
"""
255263
test_cpsat_CountGreaterThan(model::MOI.ModelLike, config::Config)
256264
@@ -302,6 +310,8 @@ function setup_test(
302310
return
303311
end
304312

313+
version_added(::typeof(test_cpsat_CountGreaterThan)) = v"1.4.0"
314+
305315
"""
306316
test_cpsat_BinPacking(model::MOI.ModelLike, config::Config)
307317
@@ -354,6 +364,8 @@ function setup_test(
354364
return
355365
end
356366

367+
version_added(::typeof(test_cpsat_BinPacking)) = v"1.4.0"
368+
357369
"""
358370
test_cpsat_Cumulative(model::MOI.ModelLike, config::Config)
359371
@@ -415,6 +427,8 @@ function setup_test(
415427
return
416428
end
417429

430+
version_added(::typeof(test_cpsat_Cumulative)) = v"1.4.0"
431+
418432
"""
419433
test_cpsat_Table(model::MOI.ModelLike, config::Config)
420434
@@ -453,6 +467,8 @@ function setup_test(
453467
return
454468
end
455469

470+
version_added(::typeof(test_cpsat_Table)) = v"1.4.0"
471+
456472
"""
457473
test_cpsat_Circuit(model::MOI.ModelLike, config::Config)
458474
@@ -486,6 +502,8 @@ function setup_test(
486502
return
487503
end
488504

505+
version_added(::typeof(test_cpsat_Circuit)) = v"1.4.0"
506+
489507
"""
490508
test_cpsat_Path(model::MOI.ModelLike, config::Config)
491509
@@ -546,3 +564,5 @@ function setup_test(
546564
)
547565
return
548566
end
567+
568+
version_added(::typeof(test_cpsat_Path)) = v"1.4.0"

src/Test/test_linear.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,7 +4158,7 @@ function setup_test(
41584158
return
41594159
end
41604160

4161-
version_added(::typeof(test_linear_HyperRectangle_VectorOfVariables)) = v"1.7.0"
4161+
version_added(::typeof(test_linear_HyperRectangle_VectorOfVariables)) = v"1.8.0"
41624162

41634163
"""
41644164
test_linear_HyperRectangle_VectorAffinneFunction(
@@ -4209,5 +4209,5 @@ end
42094209
function version_added(
42104210
::typeof(test_linear_HyperRectangle_VectorAffineFunction),
42114211
)
4212-
return v"1.7.0"
4212+
return v"1.8.0"
42134213
end

src/Test/test_model.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,8 @@ function test_model_ListOfVariablesWithAttributeSet(
12051205
return
12061206
end
12071207

1208+
version_added(::typeof(test_model_ListOfVariablesWithAttributeSet)) = v"1.22.0"
1209+
12081210
function test_model_ListOfConstraintsWithAttributeSet(
12091211
model::MOI.ModelLike,
12101212
::Config{T},
@@ -1220,12 +1222,18 @@ function test_model_ListOfConstraintsWithAttributeSet(
12201222
return
12211223
end
12221224

1225+
function version_added(::typeof(test_model_ListOfConstraintsWithAttributeSet))
1226+
return v"1.22.0"
1227+
end
1228+
12231229
function test_model_show(model::MOI.ModelLike, ::Config{T}) where {T}
12241230
# We don't enforce any particular output.
12251231
@test sprint(show, model) isa String
12261232
return
12271233
end
12281234

1235+
version_added(::typeof(test_model_show)) = v"1.31.0"
1236+
12291237
function test_model_add_constrained_variable_tuple(
12301238
model::MOI.ModelLike,
12311239
::Config{T},
@@ -1242,3 +1250,5 @@ function test_model_add_constrained_variable_tuple(
12421250
@test MOI.get(model, MOI.ConstraintSet(), c_u) == set[2]
12431251
return
12441252
end
1253+
1254+
version_added(::typeof(test_model_add_constrained_variable_tuple)) = v"1.34.0"

src/Test/test_modification.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,12 @@ function test_modification_objective_scalarquadraticcoefficientchange(
10401040
return
10411041
end
10421042

1043+
function version_added(
1044+
::typeof(test_modification_objective_scalarquadraticcoefficientchange),
1045+
)
1046+
return v"1.21.0"
1047+
end
1048+
10431049
function test_modification_constraint_scalarquadraticcoefficientchange(
10441050
model::MOI.ModelLike,
10451051
config::Config{T},
@@ -1062,6 +1068,12 @@ function test_modification_constraint_scalarquadraticcoefficientchange(
10621068
return
10631069
end
10641070

1071+
function version_added(
1072+
::typeof(test_modification_constraint_scalarquadraticcoefficientchange),
1073+
)
1074+
return v"1.21.0"
1075+
end
1076+
10651077
function test_modification_mathoptinterface_issue_2452(
10661078
model::MOI.ModelLike,
10671079
config::Config{T},
@@ -1076,3 +1088,7 @@ function test_modification_mathoptinterface_issue_2452(
10761088
@test MOI.get(model, MOI.ConstraintSet(), c) == MOI.EqualTo(T(2))
10771089
return
10781090
end
1091+
1092+
function version_added(::typeof(test_modification_mathoptinterface_issue_2452))
1093+
return v"1.28.0"
1094+
end

0 commit comments

Comments
 (0)