add assert tests
This commit is contained in:
15
test/assert/nil.go
Normal file
15
test/assert/nil.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package assert
|
||||
|
||||
import "testing"
|
||||
|
||||
func Nil(t *testing.T, data any, msgAndArgs ...interface{}) bool {
|
||||
t.Helper()
|
||||
|
||||
if data != nil {
|
||||
t.Error(msgAndArgs...)
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user