-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathtest_LazyScalarSetBridge.jl
More file actions
41 lines (34 loc) · 953 Bytes
/
test_LazyScalarSetBridge.jl
File metadata and controls
41 lines (34 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright (c) 2017: Miles Lubin and contributors
# Copyright (c) 2017: Google Inc.
#
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
module TestConstraintLazyScalarSetBridge
using Test
import MathOptInterface as MOI
function runtests()
for name in names(@__MODULE__; all = true)
if startswith("$(name)", "test_")
@testset "$(name)" begin
getfield(@__MODULE__, name)()
end
end
end
return
end
function test_runtests_scalar_affine_function()
MOI.Bridges.runtests(
MOI.Bridges.Constraint.LazyScalarSetBridge,
"""
variables: x
1.0 * x in LazyScalarSet(GreaterThan(0.0))
""",
"""
variables: x
1.0 * x in GreaterThan(0.0)
""",
)
return
end
end # module
TestConstraintLazyScalarSetBridge.runtests()