Transpose: An empty slice passes all the tests
Closed this issue · 0 comments
mikejoh12 commented
The tests for Transpose all pass with a function returning an empty slice. To reproduce, run the tests with the code below which will pass:
func Transpose(input []string) []string {
return []string{}
}
The likely cause appears to be the || conditional in the TestTranspose function:
if len(actual) == 0 || len(tc.expected) == 0 {
return
}