aboutsummaryrefslogtreecommitdiff
path: root/src/internal/concurrent/hashtriemap_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/concurrent/hashtriemap_test.go')
-rw-r--r--src/internal/concurrent/hashtriemap_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/internal/concurrent/hashtriemap_test.go b/src/internal/concurrent/hashtriemap_test.go
index 96f134c293..e233824c0f 100644
--- a/src/internal/concurrent/hashtriemap_test.go
+++ b/src/internal/concurrent/hashtriemap_test.go
@@ -119,17 +119,17 @@ func testHashTrieMap(t *testing.T, newMap func() *HashTrieMap[string, int]) {
}
}
})
- t.Run("Enumerate", func(t *testing.T) {
+ t.Run("All", func(t *testing.T) {
m := newMap()
- testEnumerate(t, m, testDataMap(testData[:]), func(_ string, _ int) bool {
+ testAll(t, m, testDataMap(testData[:]), func(_ string, _ int) bool {
return true
})
})
- t.Run("EnumerateDelete", func(t *testing.T) {
+ t.Run("AllDelete", func(t *testing.T) {
m := newMap()
- testEnumerate(t, m, testDataMap(testData[:]), func(s string, i int) bool {
+ testAll(t, m, testDataMap(testData[:]), func(s string, i int) bool {
expectDeleted(t, s, i)(m.CompareAndDelete(s, i))
return true
})
@@ -200,12 +200,12 @@ func testHashTrieMap(t *testing.T, newMap func() *HashTrieMap[string, int]) {
})
}
-func testEnumerate[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) {
+func testAll[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) {
for k, v := range testData {
expectStored(t, k, v)(m.LoadOrStore(k, v))
}
visited := make(map[K]int)
- m.Enumerate(func(key K, got V) bool {
+ m.All()(func(key K, got V) bool {
want, ok := testData[key]
if !ok {
t.Errorf("unexpected key %v in map", key)