1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-05-31 13:47:48 +08:00
parent ebf862e40b
commit 6d39dbb942
8 changed files with 72 additions and 18 deletions

View File

@ -13,10 +13,12 @@ func TestForEach(t *testing.T) {
assert.True(t, hashMap.Exist("a"))
assert.Equal(t, len(m), hashMap.Count())
hashMap.ForEach(func(s string, a any) {
hashMap.ForEach(func(s string, a any) bool {
if _, ok := m[s]; !ok {
t.Fatal("值不存在")
}
return false
})
for k := range m {