diff options
Diffstat (limited to 'check/check_test.go')
| -rw-r--r-- | check/check_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/check/check_test.go b/check/check_test.go index 9c73d52..8c6087e 100644 --- a/check/check_test.go +++ b/check/check_test.go @@ -343,3 +343,14 @@ func TestCheckReturnValues(t *testing.T) { } }) } + +func TestCheckNilForNilPointer(t *testing.T) { + mockT := &cmtest.MockT{} + var value *cmtest.MockT = nil + + passed := Nil(mockT, value) + + if !passed { + t.Fatal("check.Nil should have returned true for nil pointer") + } +} |