summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-06-30 16:32:40 -0400
committerSeth Tisue <seth@tisue.net>2015-06-30 16:32:40 -0400
commit43e115e120b151259e47de1878fdbe0d400f75b5 (patch)
treeadbe9e3d935575e3ada7a43713664e4aaa052633 /test
parent80ee730a4380709eaaf6ce3d80e52d641dd7d86d (diff)
parent66bdc5200f5270f4064c6b92192a43db34136714 (diff)
downloadscala-43e115e120b151259e47de1878fdbe0d400f75b5.tar.gz
scala-43e115e120b151259e47de1878fdbe0d400f75b5.tar.bz2
scala-43e115e120b151259e47de1878fdbe0d400f75b5.zip
Merge pull request #4585 from ruippeixotog/fix-mutable-treemap-clear
Fix size update on `mutable.TreeMap#clear()`
Diffstat (limited to 'test')
-rw-r--r--test/files/scalacheck/MutableTreeMap.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/scalacheck/MutableTreeMap.scala b/test/files/scalacheck/MutableTreeMap.scala
index ac073b1c42..b072307a63 100644
--- a/test/files/scalacheck/MutableTreeMap.scala
+++ b/test/files/scalacheck/MutableTreeMap.scala
@@ -163,7 +163,7 @@ package scala.collection.mutable {
property("clear") = forAll { (map: mutable.TreeMap[K, V]) =>
map.clear()
- map.isEmpty
+ map.isEmpty && map.size == 0
}
property("serializable") = forAll { (map: mutable.TreeMap[K, V]) =>
@@ -303,7 +303,7 @@ package scala.collection.mutable {
property("clear") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) =>
val mapView = map.rangeImpl(from, until)
mapView.clear()
- map.isEmpty && mapView.isEmpty
+ map.isEmpty && mapView.isEmpty && map.size == 0 && mapView.size == 0
}
property("serializable") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) =>