learn-go/snippetbox/internal/assert/assert.go
2024-02-13 12:23:57 -08:00

14 lines
191 B
Go

package assert
import (
"testing"
)
func Equal[T comparable](t *testing.T, actual, expected T) {
t.Helper()
if actual != expected {
t.Errorf("got %v; want %v", actual, expected)
}
}