Skip to content

Commit

Permalink
more fixes to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maltezfaria committed Dec 6, 2022
1 parent 2ffe0bf commit 467805c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 467805c

Please sign in to comment.