Skip to content

Commit

Permalink
at-compat for OptimizationTrace (#3)
Browse files Browse the repository at this point in the history
* at-compat for OptimizationTrace

* Remove nowarn

* Bump Compat to 0.18
  • Loading branch information
pkofod authored Jun 1, 2017
1 parent eb2bf58 commit 24d37a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.5
Reexport
NLSolversBase
Compat 0.17
Compat 0.18
2 changes: 1 addition & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function Base.show(io::IO, t::OptimizationState)
return
end

OptimizationTrace{T} = Vector{OptimizationState{T}}
@compat OptimizationTrace{T} = Vector{OptimizationState{T}}
function Base.show(io::IO, tr::OptimizationTrace)
@printf io "Iter Function value Gradient norm \n"
@printf io "------ -------------- --------------\n"
Expand Down
9 changes: 2 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ using OptimBase
using Base.Test
import Base.summary

if !isdefined(Base.Test, Symbol("@test_nowarn"))
macro test_nowarn(ex)
esc(ex)
end
end

immutable FakeOptimizer <: Optimizer
end

Expand All @@ -16,7 +10,8 @@ end
@test_throws ErrorException summary(a_fake_optimizer)

Base.summary(::FakeOptimizer) = "Fake Optimizer"
@test_nowarn summary(a_fake_optimizer)
# add back when moving to v0.6
# @test_nowarn summary(a_fake_optimizer)
end

@testset "optimization results" begin
Expand Down

0 comments on commit 24d37a5

Please sign in to comment.