Comparable asserts two comparable values that they equal.
(t *testing.T, name string, want T, got T)
| 12 | |
| 13 | // Comparable asserts two comparable values that they equal. |
| 14 | func Comparable[T comparable](t *testing.T, name string, want T, got T) { |
| 15 | if want != got { |
| 16 | t.Errorf(`%s: want "%v", got "%v"`, name, want, got) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | // ElementsMatch asserts that two slices of strings contain the same values, |
| 21 | // with no regard to the ordering. |
no outgoing calls