-
-
Notifications
You must be signed in to change notification settings - Fork 390
/
runtests.jl
executable file
·47 lines (41 loc) · 1.55 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
46
47
# 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
#############################################################################
# test/runtests.jl
#############################################################################
using Test
import JuMP
@testset "Ambiguities" begin
# It is important to run these first, before the tests start adding methods.
@test isempty(Test.detect_ambiguities(JuMP))
# TODO(odow): there are still some ambiguities in Containers
# @test isempty(Test.detect_ambiguities(JuMP.Containers))
end
t = time()
include("Containers/Containers.jl")
println("Containers.jl took $(round(time() - t; digits = 1)) seconds.")
for file in filter(f -> endswith(f, ".jl"), readdir(@__DIR__))
if file in [
"runtests.jl",
"utilities.jl",
"JuMPExtension.jl",
"nlp_solver.jl",
"hygiene.jl",
]
continue
end
@testset "$(file)" begin
t = time()
include(file)
println("$(file) took $(round(time() - t; digits = 1)) seconds.")
end
end
# TODO: The hygiene test should run in a separate Julia instance where JuMP
# hasn't been loaded via `using`.
include("hygiene.jl")