Skip to content

Commit

Permalink
fix: remove assert code when result param is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Jan 16, 2024
1 parent 9c187af commit 085159c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/template/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,12 @@ func Test_{{.TargetStruct}}_{{.MethodName}}(t *testing.T) {
for i, tt := range {{.OriginStruct.Type}}{{.MethodName}}TestCase {
t.Run("{{.MethodName}}_"+strconv.Itoa(i), func(t *testing.T) {
{{if .GetTestResultParamInTmpl}}
{{.GetTestResultParamInTmpl}} := do.{{.MethodName}}({{.GetTestParamInTmpl}})
{{.GetAssertInTmpl}}
{{else}}
do.{{.MethodName}}({{.GetTestParamInTmpl}})
{{end}}
})
}
}
Expand Down

0 comments on commit 085159c

Please sign in to comment.