Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Nov 25, 2024
1 parent 6200306 commit 5321b74
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/C_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,19 @@ function test_OpenIpoptOutputFile()
return
end

function _ipopt_version()
io = IOBuffer()
run(pipeline(`$(Ipopt_jll.amplexe()) -v`; stdout = io))
seekstart(io)
version = read(io, String)
m = match(r"Ipopt ([0-9]+.[0-9]+.[0-9]+)", version)
return VersionNumber(m[1])
end

function test_GetIpoptCurrentIterate()
if _ipopt_version() < v"3.14.12"
return # Bug fixed in 3.14.12
end
prob = Ipopt.CreateIpoptProblem(
1, # n,
[0.0], # x_L,
Expand Down Expand Up @@ -398,6 +410,9 @@ function test_GetIpoptCurrentIterate()
end

function test_GetIpoptCurrentViolations()
if _ipopt_version() < v"3.14.12"
return # Bug fixed in 3.14.12
end
prob = Ipopt.CreateIpoptProblem(
1, # n,
[0.0], # x_L,
Expand Down

0 comments on commit 5321b74

Please sign in to comment.