File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -120,21 +120,25 @@ X = randn(Float32, 10);
120120 tree (X)[1 ]
121121 @test false
122122catch e
123- @test isa (e, ErrorException)
123+ @test e isa ErrorException
124124 # Check that "Failed to evaluate" is in the message:
125125 @test occursin (" Failed to evaluate" , e. msg)
126126 current_exceptions ()
127127end ;
128128@test length (stack) == 2
129- @test isa ( stack[1 ]. exception, DomainError)
129+ @test stack[1 ]. exception isa DomainError
130130
131131# If a method is not defined, we should get a nothing:
132132X = randn (Float32, 1 , 10 );
133133@test tree (X; throw_errors= false ) === nothing
134134# or a MethodError:
135- try
135+ @noinline stack = try
136136 tree (X; throw_errors= true )
137137 @test false
138138catch e
139- @test isa (current_exceptions ()[1 ]. exception, MethodError)
139+ @test e isa ErrorException
140+ @test occursin (" Failed to evaluate" , e. msg)
141+ current_exceptions ()
140142end
143+ @test length (stack) == 2
144+ @test stack[1 ]. exception isa MethodError
You can’t perform that action at this time.
0 commit comments