ceremonyclient/go-libp2p/core/test/errors.go

20 lines
264 B
Go
Raw Normal View History

2023-08-21 03:50:38 +00:00
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)
}
}