From 9fec0a47910c6d6d6ee695e7e90d2eb5e14ac00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Wed, 11 Mar 2026 08:58:17 +0100 Subject: [PATCH] Alloc tests --- test/substitution.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/substitution.jl b/test/substitution.jl index 730a873..988094c 100644 --- a/test/substitution.jl +++ b/test/substitution.jl @@ -4,11 +4,10 @@ p = x^2 * y + y^2 + x @test (@inferred p(x=>1, y=>2)) == 7 @test (@inferred p(x=>5)(y=>3)) == p(x=>5, y=>3) - @test @wrappedallocs(p(x=>1, y=>2)) == 0 # Works on Julia v0.6 but fails on Julia v0.7 + @test 0 == @allocated p(x=>1, y=>2) @test (@inferred x(x=>5)) == 5 @test (@inferred x(y=>2)) == x @test (@inferred x(x=>y)) == y - end @testset "partial substitution" begin @@ -94,5 +93,3 @@ end @test @inferred(subs(5, x=>2)) == 5 @test @inferred(subs(11, (x, y)=>(y, x))) == 11 end - -