forked from jump-dev/JuMP.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntests.jl
executable file
·45 lines (37 loc) · 1.52 KB
/
runtests.jl
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
42
43
44
45
# Copyright 2017, Iain Dunning, Joey Huchette, Miles Lubin, and contributors
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#############################################################################
# JuMP
# An algebraic modeling language for Julia
# See https://github.com/jump-dev/JuMP.jl
#############################################################################
import JuMP
import Test
# It is important to test this _before_ calling `include_modules_to_test`
# because some of the tests introduce new ambiguities.
if VERSION < v"1.8"
# In Julia v1.6.x is one ambiguity with a method in StaticArrays that we
# can't easily work-around without importing StaticArrays.
Test.@test length(Test.detect_ambiguities(JuMP; recursive = true)) == 1
else
Test.@test isempty(Test.detect_ambiguities(JuMP; recursive = true))
end
include("Kokako.jl")
const MODULES_TO_TEST = Kokako.include_modules_to_test(JuMP)
include(joinpath(@__DIR__, "JuMPExtension.jl"))
if isempty(ARGS)
# JuMPExtension.jl also contains some tests.
push!(MODULES_TO_TEST, "JuMPExtension.jl" => JuMPExtension)
end
Kokako.run_tests(MODULES_TO_TEST)
Kokako.run_tests(
MODULES_TO_TEST,
JuMPExtension.MyModel,
JuMPExtension.MyVariableRef;
test_prefix = "test_extension_",
include_names = Dict(
"test_mutable_arithmetics.jl" => ["test_extension_promote_operation"],
),
)