Skip to content

Commit 350cd75

Browse files
Address code review comment (#244 (comment)): be consistent about using .keySet to express a map's keys.
1 parent ab3637e commit 350cd75

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/scala/scala/collection/decorators/MapDecoratorTest.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class MapDecoratorTest {
113113

114114
Assert.assertEquals("Expect the same keys to appear in the join taken either way around.", ourChanges.mergeByKey(theirChanges).keySet, theirChanges
115115
.mergeByKey(ourChanges)
116-
.keys)
116+
.keySet)
117117

118118
Assert.assertTrue("Expect the same associated values to appear in the join taken either way around, albeit swapped around and not necessarily in the same key order.",
119119
ourChanges
@@ -124,9 +124,9 @@ class MapDecoratorTest {
124124
.sorted
125125
.sameElements(theirChanges.mergeByKey(ourChanges).values.toList.sorted))
126126

127-
Assert.assertEquals("Expect all the keys to appear in an outer join.", ourChanges.mergeByKey(theirChanges).keys, allKeys)
127+
Assert.assertEquals("Expect all the keys to appear in an outer join.", ourChanges.mergeByKey(theirChanges).keySet, allKeys)
128128

129-
Assert.assertEquals("Expect all the keys to appear in an outer join.", theirChanges.mergeByKey(ourChanges).keys, allKeys)
129+
Assert.assertEquals("Expect all the keys to appear in an outer join.", theirChanges.mergeByKey(ourChanges).keySet, allKeys)
130130
}
131131

132132
locally {
@@ -145,7 +145,7 @@ class MapDecoratorTest {
145145

146146
Assert.assertEquals("Expect the same keys to appear in the join taken either way around.", ourChanges.mergeByKey(theirChangesRedux).keySet, theirChangesRedux
147147
.mergeByKey(ourChanges)
148-
.keys)
148+
.keySet)
149149

150150
Assert.assertTrue("Expect the same associated values to appear in the join taken either way around, albeit swapped around and not necessarily in the same key order.",
151151
ourChanges
@@ -156,9 +156,9 @@ class MapDecoratorTest {
156156
.sorted
157157
.sameElements(theirChangesRedux.mergeByKey(ourChanges).values.toList.sorted))
158158

159-
Assert.assertEquals("Expect all the keys to appear in an outer join.", ourChanges.mergeByKey(theirChangesRedux).keys, allKeys)
159+
Assert.assertEquals("Expect all the keys to appear in an outer join.", ourChanges.mergeByKey(theirChangesRedux).keySet, allKeys)
160160

161-
Assert.assertEquals("Expect all the keys to appear in an outer join.", theirChangesRedux.mergeByKey(ourChanges).keys, allKeys)
161+
Assert.assertEquals("Expect all the keys to appear in an outer join.", theirChangesRedux.mergeByKey(ourChanges).keySet, allKeys)
162162
}
163163
}
164164

0 commit comments

Comments
 (0)