We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f01ba53 commit 43a6cccCopy full SHA for 43a6ccc
1 file changed
pkg/xmap/xmap_test.go
@@ -132,16 +132,7 @@ func TestMap(t *testing.T) {
132
emptyMap := map[string]int{}
133
emptyResult := xmap.MapKeys(emptyMap, fn)
134
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)
+
145
})
146
147
}
0 commit comments