Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonboom committed Oct 3, 2024
1 parent a7e1c09 commit 044379d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func TestErrorNilChecker(t *testing.T) {
assert.Zerof(t, err.Error(), "msg with args %d %s", 42, "42")
assert.NotZero(t, err.Error())
assert.NotZerof(t, err.Error(), "msg with args %d %s", 42, "42")
assert.Nil(t, errs)
assert.Nilf(t, errs, "msg with args %d %s", 42, "42")
assert.NotNil(t, errs)
assert.NotNilf(t, errs, "msg with args %d %s", 42, "42")
assert.Empty(t, errs)
assert.Emptyf(t, errs, "msg with args %d %s", 42, "42")
assert.NotEmpty(t, errs)
Expand Down
2 changes: 2 additions & 0 deletions internal/testgen/gen_error_nil.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func (g ErrorNilTestsGenerator) TemplateData() any {
{Fn: "Zero", Argsf: "err.Error()"},
{Fn: "NotZero", Argsf: "err.Error()"},

{Fn: "Nil", Argsf: "errs"},
{Fn: "NotNil", Argsf: "errs"},
{Fn: "Empty", Argsf: "errs"},
{Fn: "NotEmpty", Argsf: "errs"},
{Fn: "Zero", Argsf: "errs"},
Expand Down

0 comments on commit 044379d

Please sign in to comment.