Equal succeeds if x == y, the same as [gotest.tools/v3/assert.Equal]. The type constraint makes it easier to compare against numeric literals and typed constants.
(x, y T)
| 55 | // Equal succeeds if x == y, the same as [gotest.tools/v3/assert.Equal]. |
| 56 | // The type constraint makes it easier to compare against numeric literals and typed constants. |
| 57 | func Equal[T any](x, y T) Comparison { |
| 58 | return gotest.Equal(x, y) |
| 59 | } |
| 60 | |
| 61 | // Len succeeds if actual has the expected length. |
| 62 | func Len[Slice ~[]E, E any](actual Slice, expected int) Comparison { |