Skip to content

Commit 1af98eb

Browse files
authored
Merge pull request #3 from vatsalpatel/array_functions
Remove unnecessary code from tests
2 parents 422c00d + bd9c62f commit 1af98eb

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

arrays_test.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -505,16 +505,9 @@ func TestMap(t *testing.T) {
505505
t.Run(testCase.name, func(t *testing.T) {
506506
result := Map(testCase.input, testCase.transform, testCase.arg)
507507

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)
508+
if !reflect.DeepEqual(result, testCase.expected) {
509+
t.Errorf("expected %v but got %v", testCase.expected, result)
516510
}
517-
// Additional assertions if needed
518511
})
519512
}
520513
}

0 commit comments

Comments
 (0)