From 341568c2e8ca22b3e23ab1de1480276d0e49adb9 Mon Sep 17 00:00:00 2001 From: ayan george Date: Tue, 9 Aug 2022 14:21:14 -0400 Subject: [PATCH] Updated TableDrivenTests (markdown) --- TableDrivenTests.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TableDrivenTests.md b/TableDrivenTests.md index 30deef5a..af0cb198 100644 --- a/TableDrivenTests.md +++ b/TableDrivenTests.md @@ -66,11 +66,11 @@ func TestTLog(t *testing.T) { {"test 3"}, {"test 4"}, } - for _, tt := range tests { - tt := tt // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables - t.Run(tt.name, func(t *testing.T) { + for _, test := range tests { + test := test // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables + t.Run(test.name, func(t *testing.T) { t.Parallel() // marks each test case as capable of running in parallel with each other - t.Log(tt.name) + t.Log(test.name) }) } }