Skip to content

Commit

Permalink
Change error shrinking to only compare the type
Browse files Browse the repository at this point in the history
This is an improvement in the short term, since this allows errors
with different messages to shrink better. A followup to this
commit will allow users to hook into this a bit better, by
providing a custom comparison function for their errors.
  • Loading branch information
Seelengrab committed Mar 9, 2024
1 parent 9e12dd2 commit 2ee4053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/teststate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function test_function(ts::TestState, tc::TestCase)
old_frame = first(old_trace)
frame = first(trace)
# if the error isn't the same, it can't possibly be better
if !(err == old_err && frame == old_frame)
if !(typeof(err) == typeof(old_err) && frame == old_frame)
@warn "Encountered an error, but it was different from the previously seen one - Ignoring!" Error=err Location=frame
return (false, false)
end
Expand Down

0 comments on commit 2ee4053

Please sign in to comment.