Skip to content

Commit 43a6ccc

Browse files
committed
remove wrong test codes
1 parent f01ba53 commit 43a6ccc

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

pkg/xmap/xmap_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,7 @@ func TestMap(t *testing.T) {
132132
emptyMap := map[string]int{}
133133
emptyResult := xmap.MapKeys(emptyMap, fn)
134134
assert.Equal(t, map[string]int{}, emptyResult)
135-
136-
// Test with duplicate key generation (last one wins)
137-
m2 := map[int]string{1: "a", 2: "b", 3: "c"}
138-
fn2 := func(k int, v string) int {
139-
return k % 2 // This will create duplicate keys: 1%2=1, 2%2=0, 3%2=1
140-
}
141-
result2 := xmap.MapKeys(m2, fn2)
142-
// Should have keys 0 and 1, with values from the last occurrence of each key
143-
expected2 := map[int]string{0: "b", 1: "c"}
144-
assert.Equal(t, expected2, result2)
135+
145136
})
146137

147138
}

0 commit comments

Comments
 (0)