From 4ca260634222c07b8648b2d8dd90c860c0120371 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Sun, 10 Dec 2023 00:40:40 -0800 Subject: [PATCH] mapper_windows_test: assert.NotZero for nil check (#396) Follow up to #394, specifically [this comment][1]. [1]: https://github.com/alecthomas/kong/pull/394#discussion_r1421683093 --- mapper_windows_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapper_windows_test.go b/mapper_windows_test.go index 94958ec..ba2913f 100644 --- a/mapper_windows_test.go +++ b/mapper_windows_test.go @@ -33,7 +33,7 @@ func TestWindowsFileMapper(t *testing.T) { p := mustNew(t, &cli) _, err := p.Parse([]string{"testdata\\file.txt"}) assert.NoError(t, err) - assert.True(t, cli.File != nil, "File should not be nil") + assert.NotZero(t, cli.File, "File should not be nil") _ = cli.File.Close() _, err = p.Parse([]string{"testdata\\missing.txt"}) assert.Error(t, err)