Skip to content

Commit 6459825

Browse files
authored
Merge pull request #177 from control-toolbox/176-general-up-compat-ctdirect
add CTDirect/CTParser tests
2 parents 609bc23 + d4eee91 commit 6459825

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

test/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
[deps]
2+
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
23
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
34
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"
5+
CTDirect = "790bbbee-bee9-49ee-8912-a9de031322d5"
6+
CTParser = "32681960-a1b1-40db-9bff-a1ca817385d1"
47
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
58
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
69
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
710
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
811
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
912

1013
[compat]
14+
ADNLPModels = "0.8"
1115
Aqua = "0.8"
1216
CTBase = "0.16"
17+
CTDirect = "0.15"
18+
CTParser = "0.4"
1319
JLD2 = "0.5"
1420
JSON3 = "1"
1521
NLPModelsIpopt = "0.10"

test/runtests.jl

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,25 @@ end
3535

3636
# test with CTDirect and CTParser: must be commented if new version of CTModels, that is breaking
3737

38-
# using CTDirect
39-
# using NLPModelsIpopt
40-
# import CTParser: CTParser, @def
41-
# CTParser.prefix!(:CTModels); # code generated by @def is prefixed by CTModels (not by OptimalControl - the default)
38+
using CTDirect
39+
using NLPModelsIpopt
40+
using ADNLPModels
41+
import CTParser: CTParser, @def
42+
CTParser.prefix!(:CTModels); # code generated by @def is prefixed by CTModels (not by OptimalControl - the default)
4243

43-
# #
44-
# include("solution_example_path_constraints.jl")
44+
#
45+
include("solution_example_path_constraints.jl")
4546

46-
# @testset verbose = true showtiming = true "CTModels tests" begin
47-
# for name in (
48-
# :plot,
49-
# :export_import,
50-
# )
51-
# @testset "$(name)" begin
52-
# test_name = Symbol(:test_, name)
53-
# println("testing: ", string(name))
54-
# include("$(test_name).jl")
55-
# @eval $test_name()
56-
# end
57-
# end
58-
# end
47+
@testset verbose = true showtiming = true "CTModels tests" begin
48+
for name in (
49+
:plot,
50+
:export_import,
51+
)
52+
@testset "$(name)" begin
53+
test_name = Symbol(:test_, name)
54+
println("testing: ", string(name))
55+
include("$(test_name).jl")
56+
@eval $test_name()
57+
end
58+
end
59+
end

0 commit comments

Comments
 (0)