mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
7a12fc6d75
* checkpoint * Update beacon-chain/sync/rpc_test.go * change conditional * fix test * fmt Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
package assert
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assertions"
|
|
)
|
|
|
|
// Equal compares values using comparison operator.
|
|
func Equal(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{}) {
|
|
assertions.Equal(tb.Errorf, expected, actual, msg...)
|
|
}
|
|
|
|
// NotEqual compares values using comparison operator.
|
|
func NotEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{}) {
|
|
assertions.NotEqual(tb.Errorf, expected, actual, msg...)
|
|
}
|
|
|
|
// DeepEqual compares values using DeepEqual.
|
|
func DeepEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{}) {
|
|
assertions.DeepEqual(tb.Errorf, expected, actual, msg...)
|
|
}
|
|
|
|
// NoError asserts that error is nil.
|
|
func NoError(tb assertions.AssertionTestingTB, err error, msg ...interface{}) {
|
|
assertions.NoError(tb.Errorf, err, msg...)
|
|
}
|
|
|
|
// ErrorContains asserts that actual error contains wanted message.
|
|
func ErrorContains(tb assertions.AssertionTestingTB, want string, err error, msg ...interface{}) {
|
|
assertions.ErrorContains(tb.Errorf, want, err, msg...)
|
|
}
|
|
|
|
// NotNil asserts that passed value is not nil.
|
|
func NotNil(tb assertions.AssertionTestingTB, obj interface{}, msg ...interface{}) {
|
|
assertions.NotNil(tb.Errorf, obj, msg...)
|
|
}
|