Skip to content

Commit c61e5e2

Browse files
committed
tree dictionary keys hashable cleanup
1 parent a047213 commit c61e5e2

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

Tests/HashTreeCollectionsTests/TreeDictionary.Keys Tests.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,21 @@ class TreeDictionaryKeysTests: CollectionTestCase {
146146
[
147147
["e"]
148148
],
149+
[
150+
["f"], ["f"],
151+
],
152+
[
153+
["g"], ["g"],
154+
],
155+
[
156+
["h"], ["h"],
157+
],
158+
[
159+
["i"], ["i"],
160+
],
161+
[
162+
["j"], ["j"],
163+
],
149164
[
150165
["a", "b"], ["b", "a"],
151166
],
@@ -163,7 +178,7 @@ class TreeDictionaryKeysTests: CollectionTestCase {
163178
["e", "a", "d"], ["e", "d", "a"],
164179
],
165180
]
166-
let keys = strings.map { $0.map { TreeDictionary(uniqueKeysWithValues: $0.map { ($0, UUID().uuidString) }).keys }}
181+
let keys = strings.map { $0.map { TreeDictionary(uniqueKeysWithValues: $0.map { ($0, Int.random(in: 1...100)) }).keys }}
167182
checkHashable(equivalenceClasses: keys)
168183
}
169184

Tests/HashTreeCollectionsTests/TreeSet Tests.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,21 @@ class TreeSetTests: CollectionTestCase {
681681
[
682682
["e"]
683683
],
684+
[
685+
["f"], ["f"],
686+
],
687+
[
688+
["g"], ["g"],
689+
],
690+
[
691+
["h"], ["h"],
692+
],
693+
[
694+
["i"], ["i"],
695+
],
696+
[
697+
["j"], ["j"],
698+
],
684699
[
685700
["a", "b"], ["b", "a"],
686701
],

0 commit comments

Comments
 (0)