You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this is because test always runs on check-bounds=yes mode?
MWE:
# src/InboundsDemo.jlmodule InboundsDemo
export inbounds_test
functionf(x)
x >1&&throw(ArgumentError("x should be less than 1"))
returntrueend
Base.@propagate_inboundsfunctioninbounds_test(x)
@boundscheckf(x)
x +1endend# module
# test/runtest.jlusing InboundsDemo
using Test
@testset"InboundsDemo.jl"beginf(x) =@inboundsinbounds_test(x)
@testf(1) ==2@testf(2) ==3@test_throws ArgumentError inbounds_test(2)
end
$ julia --startup=no --project=.
(InboundsDemo) pkg> test
Testing InboundsDemo
Status `/private/var/folders/c0/p23z1x6x3jg_qtqsy_r421y40000gn/T/jl_Um6tnL/Project.toml`
[432f9513] InboundsDemo v0.1.0`~/Documents/Julia/InboundsDemo`
[8dfed614] Test
Status `/private/var/folders/c0/p23z1x6x3jg_qtqsy_r421y40000gn/T/jl_Um6tnL/Manifest.toml`
[432f9513] InboundsDemo v0.1.0`~/Documents/Julia/InboundsDemo`
[2a0f44e3] Base64
[8ba89e20] Distributed
[b77e0a4c] InteractiveUtils
[56ddb016] Logging
[d6f4376e] Markdown
[9a3f8284] Random
[9e88b42a] Serialization
[6462fe0b] Sockets
[8dfed614] Test
InboundsDemo.jl: Error During Test at /Users/jc/Documents/Julia/InboundsDemo/test/runtests.jl:7
Test threw exception
Expression:f(2) ==3
ArgumentError: x should be less than 1
Stacktrace:
[1] f at /Users/jc/Documents/Julia/InboundsDemo/src/InboundsDemo.jl:6 [inlined]
[2] inbounds_test at /Users/jc/Documents/Julia/InboundsDemo/src/InboundsDemo.jl:11 [inlined]
[3] (::var"#f#1")(::Int64) at /Users/jc/Documents/Julia/InboundsDemo/test/runtests.jl:5
[4] top-level scope at /Users/jc/Documents/Julia/InboundsDemo/test/runtests.jl:7
[5] top-level scope at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[6] top-level scope at /Users/jc/Documents/Julia/InboundsDemo/test/runtests.jl:5
Test Summary:| Pass Error Total
InboundsDemo.jl |213
ERROR: LoadError: Some tests did not pass:2 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/jc/Documents/Julia/InboundsDemo/test/runtests.jl:4
ERROR: Package InboundsDemo errored during testing
julia>include("test/runtests.jl")
Test Summary:| Pass Total
InboundsDemo.jl |33
Test.DefaultTestSet("InboundsDemo.jl", Any[], 3, false)
Perhaps this is because
test
always runs oncheck-bounds=yes
mode?MWE:
This makes it a bit hard to test
checkbounds
behavior, e.g., in JuliaArrays/PaddedViews.jl#40 (comment)The text was updated successfully, but these errors were encountered: