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);
120
120
tree (X)[1 ]
121
121
@test false
122
122
catch e
123
- @test isa (e, ErrorException)
123
+ @test e isa ErrorException
124
124
# Check that "Failed to evaluate" is in the message:
125
125
@test occursin (" Failed to evaluate" , e. msg)
126
126
current_exceptions ()
127
127
end ;
128
128
@test length (stack) == 2
129
- @test isa ( stack[1 ]. exception, DomainError)
129
+ @test stack[1 ]. exception isa DomainError
130
130
131
131
# If a method is not defined, we should get a nothing:
132
132
X = randn (Float32, 1 , 10 );
133
133
@test tree (X; throw_errors= false ) === nothing
134
134
# or a MethodError:
135
- try
135
+ @noinline stack = try
136
136
tree (X; throw_errors= true )
137
137
@test false
138
138
catch 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 ()
140
142
end
143
+ @test length (stack) == 2
144
+ @test stack[1 ]. exception isa MethodError
You can’t perform that action at this time.
0 commit comments