From 467805c2d19e5ba6b268ad0338e04d0cad0579c2 Mon Sep 17 00:00:00 2001 From: "Luiz M. Faria" Date: Tue, 6 Dec 2022 20:44:53 +0100 Subject: [PATCH] more fixes to 1.0 --- test/runtests.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 53bfce2..5bb8a1f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -77,15 +77,15 @@ end @testset "alloc_buf" begin buffer = alloc_buf(;dimension=1) - @test @inferred(hcubature(x -> cos(x[1]), (0,), (1,);buffer))[1] ≈ sin(1) ≈ - @inferred(hquadrature(cos, 0, 1;buffer))[1] + @test @inferred(hcubature(x -> cos(x[1]), (0,), (1,);buffer=buffer))[1] ≈ sin(1) ≈ + @inferred(hquadrature(cos, 0, 1; buffer=buffer))[1] buffer = alloc_buf(;dimension=2) - @test hcubature(x -> cos(x[1])*cos(x[2]), [0,0], [1,1];buffer)[1] ≈ sin(1)^2 ≈ - @inferred(hcubature(x -> cos(x[1])*cos(x[2]), (0,0), (1,1);buffer))[1] + @test hcubature(x -> cos(x[1])*cos(x[2]), [0,0], [1,1]; buffer=buffer)[1] ≈ sin(1)^2 ≈ + @inferred(hcubature(x -> cos(x[1])*cos(x[2]), (0,0), (1,1);buffer=buffer))[1] buffer = alloc_buf(;dimension=1, range_type=Float32, domain_type=Float32) - @test @inferred(hcubature(x -> cos(x[1]), (0.0f0,), (1.0f0,);buffer))[1] ≈ sin(1.0f0) + @test @inferred(hcubature(x -> cos(x[1]), (0.0f0,), (1.0f0,);buffer=buffer))[1] ≈ sin(1.0f0) buffer = alloc_buf(;dimension=2, range_type=Float64, domain_type=Float64) - @test @inferred(hcubature(x -> 2, (0,0), (2pi, pi);buffer)[1]) ≈ 4pi^2 + @test @inferred(hcubature(x -> 2, (0,0), (2pi, pi);buffer=buffer)[1]) ≈ 4pi^2 buffer = alloc_buf(;dimension=2, range_type=ComplexF64, domain_type=Float64) - @test @inferred(hcubature(x -> 2+im, (0,0), (2pi, pi);buffer))[1] ≈ 4pi^2 + im*2*pi^2 + @test @inferred(hcubature(x -> 2+im, (0,0), (2pi, pi);buffer=buffer))[1] ≈ 4pi^2 + im*2*pi^2 end