ceremonyclient/go-libp2p/core/test/errors.go
2023-08-20 23:07:43 -05:00

20 lines
264 B
Go

package test
import (
"testing"
)
func AssertNilError(t *testing.T, err error) {
t.Helper()
if err != nil {
t.Errorf("unexpected error: %v", err)
}
}
func ExpectError(t *testing.T, err error, msg string) {
t.Helper()
if err == nil {
t.Error(msg)
}
}