From 8526042b28b3aea872c35f67b2aef81b866ff59b Mon Sep 17 00:00:00 2001 From: tmigot Date: Thu, 21 Dec 2023 11:18:21 +0100 Subject: [PATCH] improve further test rendering --- test/allocation_test.jl | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/test/allocation_test.jl b/test/allocation_test.jl index 9378da6..9788217 100644 --- a/test/allocation_test.jl +++ b/test/allocation_test.jl @@ -20,21 +20,23 @@ function alloc_solve_model(solve, XData, H, g, ng, calls, max_calls, α) return nothing end -@testset "Allocation test in preprocess and solvemodel" for (Data, solve) in ( - (PDataKARC, AdaptiveRegularization.solve_modelKARC), - (PDataTRK, AdaptiveRegularization.solve_modelTRK), - (PDataST, AdaptiveRegularization.solve_modelST_TR), -) - XData = Data(S, T, n) - @testset "Allocation test in preprocess with $(Data)" begin - alloc_preprocess(XData, H, g, ng, calls, max_calls, α) - al = @allocated alloc_preprocess(XData, H, g, ng, calls, max_calls, α) - @test al == 0 - end +@testset "Allocation test in preprocess and solvemodel" begin + for (Data, solve) in ( + (PDataKARC, AdaptiveRegularization.solve_modelKARC), + (PDataTRK, AdaptiveRegularization.solve_modelTRK), + (PDataST, AdaptiveRegularization.solve_modelST_TR), + ) + XData = Data(S, T, n) + @testset "Allocation test in preprocess with $(Data)" begin + alloc_preprocess(XData, H, g, ng, calls, max_calls, α) + al = @allocated alloc_preprocess(XData, H, g, ng, calls, max_calls, α) + @test al == 0 + end - @testset "Allocation test in $solve with $(Data)" begin - alloc_solve_model(solve, XData, H, g, ng, calls, max_calls, α) - al = @allocated alloc_solve_model(solve, XData, H, g, ng, calls, max_calls, α) - @test al == 0 + @testset "Allocation test in $solve with $(Data)" begin + alloc_solve_model(solve, XData, H, g, ng, calls, max_calls, α) + al = @allocated alloc_solve_model(solve, XData, H, g, ng, calls, max_calls, α) + @test al == 0 + end end end