From 1f2dc06b4f50306ffe0f55b718ed7dff914fd673 Mon Sep 17 00:00:00 2001 From: AntoninKns Date: Fri, 3 Jun 2022 11:52:58 -0400 Subject: [PATCH] Minor fix for allocations test --- test/nlp/counters.jl | 1 + test/nls/counters.jl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/nlp/counters.jl b/test/nlp/counters.jl index b2e09b6b..1a9fad40 100644 --- a/test/nlp/counters.jl +++ b/test/nlp/counters.jl @@ -24,6 +24,7 @@ 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 diff --git a/test/nls/counters.jl b/test/nls/counters.jl index 1b34c59d..100dcbfd 100644 --- a/test/nls/counters.jl +++ b/test/nls/counters.jl @@ -32,9 +32,11 @@ if VERSION ≥ VersionNumber(1, 7, 3) @testset "Allocations for NLS counters" begin nls = SimpleNLSModel() + 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