diff --git a/credit_return_test.go b/credit_return_test.go index c00b0cb..76ed1b5 100644 --- a/credit_return_test.go +++ b/credit_return_test.go @@ -54,7 +54,9 @@ func TestParseReturnCredit(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var debit CreditReturn err := debit.Parse(tc.in) diff --git a/credit_reverse_test.go b/credit_reverse_test.go index 9a6a8bf..76741f2 100644 --- a/credit_reverse_test.go +++ b/credit_reverse_test.go @@ -53,7 +53,9 @@ func TestParseCreditReverse(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var cr CreditReverse err := cr.Parse(tc.in) diff --git a/credit_test.go b/credit_test.go index c1a35be..eba9bee 100644 --- a/credit_test.go +++ b/credit_test.go @@ -53,7 +53,9 @@ func TestParseCreditTxn(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var credit Credit err := credit.Parse(tc.in) diff --git a/debit_return_test.go b/debit_return_test.go index e4cc553..1903695 100644 --- a/debit_return_test.go +++ b/debit_return_test.go @@ -52,7 +52,9 @@ func TestParseReturnDebitTxn(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var debit DebitReturn err := debit.Parse(tc.in) diff --git a/debit_reverse_test.go b/debit_reverse_test.go index a0c5b37..1e0fd75 100644 --- a/debit_reverse_test.go +++ b/debit_reverse_test.go @@ -53,7 +53,9 @@ func TestParseDebitReverse(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var cr DebitReverse err := cr.Parse(tc.in) diff --git a/debit_test.go b/debit_test.go index 6772d45..50e0bc8 100644 --- a/debit_test.go +++ b/debit_test.go @@ -51,7 +51,9 @@ func TestParseDebitTxn(t *testing.T) { expectErr: &ParseError{}, }, } - for name, tc := range cases { + for name := range cases { + tc := cases[name] + t.Run(name, func(t *testing.T) { var debit Debit err := debit.Parse(tc.in)