learn-go/snippetbox/internal/assert/assert.go

14 lines
191 B
Go
Raw Normal View History

2024-02-13 20:23:57 +00:00
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)
}
}