mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Updated TableDrivenTests (markdown)
parent
05cbc2daa2
commit
341568c2e8
@ -66,11 +66,11 @@ func TestTLog(t *testing.T) {
|
|||||||
{"test 3"},
|
{"test 3"},
|
||||||
{"test 4"},
|
{"test 4"},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, test := range tests {
|
||||||
tt := tt // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
test := test // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(test.name, func(t *testing.T) {
|
||||||
t.Parallel() // marks each test case as capable of running in parallel with each other
|
t.Parallel() // marks each test case as capable of running in parallel with each other
|
||||||
t.Log(tt.name)
|
t.Log(test.name)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user