-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messagesregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous versiontestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib
Description
With this test
using Test
isMeaningOfLife(val)= @test val==42
@testset "stacktrace" begin
isMeaningOfLife(41)
end
With Julia 1.6 I can identify my top call line (runtests.jl:6)
Testing Running tests...
stacktrace: Test Failed at /home/wsl/dev/julia/bugs/TestStackTrace/test/runtests.jl:3
Expression: val == 42
Evaluated: 41 == 42
Stacktrace:
[1] isMeaningOfLife(val::Int64)
@ Main ~/dev/julia/bugs/TestStackTrace/test/runtests.jl:3
[2] macro expansion
@ ~/dev/julia/bugs/TestStackTrace/test/runtests.jl:6 [inlined]
However with Julia 1.7, I don't have a way to know who called "isMeaningOfLife"
Julia Version 1.7.0-rc1
Commit 9eade6195e (2021-09-12 06:45 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Testing Running tests...
stacktrace: Test Failed at /home/wsl/dev/julia/bugs/TestStackTrace/test/runtests.jl:3
Expression: val == 42
Evaluated: 41 == 42
Stacktrace:
[1] macro expansion
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:445 [inlined]
[2] isMeaningOfLife(val::Int64)
@ Main ~/dev/julia/bugs/TestStackTrace/test/runtests.jl:3
Test Summary: | Fail Total
stacktrace | 1 1
thanks
davnn
Metadata
Metadata
Assignees
Labels
error messagesBetter, more actionable error messagesBetter, more actionable error messagesregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous versiontestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib