The following testcase fails, while it works properly using Test.@testset:
using XUnit
@testset "" begin
@testcase "" begin
arr = zeros(Int)
doit(arr) = arr[] = 1
function kernel(arr)
doit(arr)
return
end
kernel(arr)
@test arr[] == 1
doit(ptr) = ptr[] = 2
kernel(arr)
@test arr[] == 2
end
end
In a similar vein, changing the doit method definitions to @eval doit(arr) = ... (which we require for CUDA.jl to avoid boxes), we get a world age error:
Got exception outside of a @test
MethodError: no method matching doit(::Array{Int64, 0})
The applicable method may be too new: running in world age 29599, while current world is 29600.
Closest candidates are:
doit(::Any) at /tmp/wip.jl:7 (method too new to be called from this world context.)
The following testcase fails, while it works properly using
Test.@testset
:In a similar vein, changing the
doit
method definitions to@eval doit(arr) = ...
(which we require for CUDA.jl to avoid boxes), we get a world age error: