We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 422c00d + bd9c62f commit 1af98ebCopy full SHA for 1af98eb
1 file changed
arrays_test.go
@@ -505,16 +505,9 @@ func TestMap(t *testing.T) {
505
t.Run(testCase.name, func(t *testing.T) {
506
result := Map(testCase.input, testCase.transform, testCase.arg)
507
508
- // Convert result to []string for comparison
509
- resultStrings := make([]string, len(result))
510
- for i, val := range result {
511
- resultStrings[i] = val
512
- }
513
-
514
- if !reflect.DeepEqual(resultStrings, testCase.expected) {
515
- t.Errorf("expected %v but got %v", testCase.expected, resultStrings)
+ if !reflect.DeepEqual(result, testCase.expected) {
+ t.Errorf("expected %v but got %v", testCase.expected, result)
516
}
517
- // Additional assertions if needed
518
})
519
520
0 commit comments