diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-06-25 15:31:27 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-06-25 15:31:27 -0700 |
commit | e45dfe17b37911f6ba8ea119df383a22f7c7581d (patch) | |
tree | 42bb12eca38e17abf114eb1985fb1fcd2b79440b /test/junit | |
parent | 662e23eefbe67d843945b31495e138d02f60fe5e (diff) | |
parent | 0e8b73b29d96e3a37346ae196039ebded23303a7 (diff) | |
download | scala-e45dfe17b37911f6ba8ea119df383a22f7c7581d.tar.gz scala-e45dfe17b37911f6ba8ea119df383a22f7c7581d.tar.bz2 scala-e45dfe17b37911f6ba8ea119df383a22f7c7581d.zip |
Merge pull request #4504 from ruippeixotog/mutable-treemap
SI-4147 Add an implementation of `mutable.TreeMap`
Diffstat (limited to 'test/junit')
-rw-r--r-- | test/junit/scala/collection/SetMapConsistencyTest.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/junit/scala/collection/SetMapConsistencyTest.scala b/test/junit/scala/collection/SetMapConsistencyTest.scala index 0749e61c09..5f14af7c37 100644 --- a/test/junit/scala/collection/SetMapConsistencyTest.scala +++ b/test/junit/scala/collection/SetMapConsistencyTest.scala @@ -66,6 +66,8 @@ class SetMapConsistencyTest { def boxMhm[A] = new BoxMutableMap[A, cm.HashMap[A, Int]](new cm.HashMap[A, Int], "mutable.HashMap") def boxMohm[A] = new BoxMutableMap[A, cm.OpenHashMap[A, Int]](new cm.OpenHashMap[A, Int], "mutable.OpenHashMap") + + def boxMtm[A: Ordering] = new BoxMutableMap[A, cm.TreeMap[A, Int]](new cm.TreeMap[A, Int], "mutable.TreeMap") def boxMarm[A <: AnyRef] = new BoxMutableMap[A, cm.AnyRefMap[A, Int]](new cm.AnyRefMap[A, Int](_ => -1), "mutable.AnyRefMap") { private def arm: cm.AnyRefMap[A, Int] = m.asInstanceOf[cm.AnyRefMap[A, Int]] @@ -315,7 +317,7 @@ class SetMapConsistencyTest { @Test def churnIntMaps() { val maps = Array[() => MapBox[Int]]( - () => boxMlm[Int], () => boxMhm[Int], () => boxMohm[Int], () => boxJavaM[Int], + () => boxMlm[Int], () => boxMhm[Int], () => boxMohm[Int], () => boxMtm[Int], () => boxJavaM[Int], () => boxIim, () => boxIhm[Int], () => boxIlm[Int], () => boxItm[Int] ) assert( maps.sliding(2).forall{ ms => churn(ms(0)(), ms(1)(), intKeys, 2000) } ) @@ -325,7 +327,7 @@ class SetMapConsistencyTest { def churnLongMaps() { val maps = Array[() => MapBox[Long]]( () => boxMjm, () => boxIjm, () => boxJavaM[Long], - () => boxMlm[Long], () => boxMhm[Long], () => boxMohm[Long], () => boxIhm[Long], () => boxIlm[Long] + () => boxMlm[Long], () => boxMhm[Long], () => boxMtm[Long], () => boxMohm[Long], () => boxIhm[Long], () => boxIlm[Long] ) assert( maps.sliding(2).forall{ ms => churn(ms(0)(), ms(1)(), longKeys, 10000) } ) } |