akshayjshah / attest

Type-safe assertion helpers for Go
https://pkg.go.dev/go.akshayshah.org/attest
MIT License
15 stars 2 forks source link

Trap panics from cmp #2

Closed akshayjshah closed 2 years ago

akshayjshah commented 2 years ago

Because the cmp API doesn't take a testing.TB, they're forced to panic (or make their API very unpleasant) when they get invalid input. Panics are disconcerting for users, though - we should probably trap these panics and fail the test instead.