diff --git a/src/nls/counters.jl b/src/nls/counters.jl index af7eea18..d38ab62f 100644 --- a/src/nls/counters.jl +++ b/src/nls/counters.jl @@ -88,7 +88,8 @@ for fun in fieldnames(NLSCounters) end for fun in fieldnames(Counters) - @eval $NLPModels.increment!(nls::AbstractNLSModel, ::Val{$(Meta.quot(fun))}) = nls.counters.counters.$fun += 1 + @eval $NLPModels.increment!(nls::AbstractNLSModel, ::Val{$(Meta.quot(fun))}) = + nls.counters.counters.$fun += 1 end function LinearOperators.reset!(nls::AbstractNLSModel) diff --git a/test/nlp/counters.jl b/test/nlp/counters.jl index 1a9fad40..ba5a7d63 100644 --- a/test/nlp/counters.jl +++ b/test/nlp/counters.jl @@ -23,9 +23,9 @@ end if VERSION ≥ VersionNumber(1, 7, 3) @testset "Allocations for NLP counters" begin nlp = SimpleNLPModel() - + increment!(nlp, :neval_obj) alloc_mem = @allocated increment!(nlp, :neval_obj) @test alloc_mem == 0 end -end \ No newline at end of file +end diff --git a/test/nls/counters.jl b/test/nls/counters.jl index 100dcbfd..7bb149db 100644 --- a/test/nls/counters.jl +++ b/test/nls/counters.jl @@ -1,5 +1,4 @@ @testset "Increase coverage of NLSCounters" begin - nls = SimpleNLSModel() obj(nls, nls.meta.x0) @@ -35,9 +34,9 @@ if VERSION ≥ VersionNumber(1, 7, 3) increment!(nls, :neval_obj) alloc_mem = @allocated increment!(nls, :neval_obj) @test alloc_mem == 0 - + increment!(nls, :neval_residual) alloc_mem2 = @allocated increment!(nls, :neval_residual) @test alloc_mem2 == 0 end -end \ No newline at end of file +end