-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
testsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib
Description
I like how it shows the values of y and x here
julia> @test y < x
Test Failed at REPL[6]:1
Expression: y < x
Evaluated: 2 < 1I would like to make it do that for custom functions.
julia> eq(x,y) = x == y;
julia> @test eq(x,y)
Test Failed at REPL[5]:1
Expression: eq(x, y)A few options are presented on Discourse but they all require intervention by the tester at the test site.
I want to customize the error display by dispatching on the predicate function and/or its arguments. So for my custom eq and maybe its argument types I could get
julia> @test eq(x,y)
Test Failed at REPL[5]:1
Expression eq(x,y)
Evaluated eq(1,2)and other predicates could define other displays.
Metadata
Metadata
Assignees
Labels
testsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib