mirror of
https://github.com/stretchr/testify.git
synced 2025-05-31 11:42:44 +00:00
Test Nil assertion behavior for typed nil values
This commit is contained in:
parent
fb64a0ab08
commit
ee60e76e54
@ -211,6 +211,9 @@ func TestNil(t *testing.T) {
|
||||
if !Nil(mockT, nil) {
|
||||
t.Error("Nil should return true: object is nil")
|
||||
}
|
||||
if !Nil(mockT, (*struct{})(nil)) {
|
||||
t.Error("Nil should return true: object is (*struct{})(nil)")
|
||||
}
|
||||
if Nil(mockT, new(AssertionTesterConformingObject)) {
|
||||
t.Error("Nil should return false: object is not nil")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user