Test Nil assertion behavior for typed nil values

pull/220/head
Bryan Matsuo 2015-09-24 10:02:27 -07:00
parent fb64a0ab08
commit ee60e76e54
1 changed files with 3 additions and 0 deletions

View File

@ -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")
}