summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-01-24 11:09:46 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-01-24 11:09:46 -0800
commit5dd4633e9a176bd103371c115f85303b9e0fdf98 (patch)
tree61d183922d93110f735678052ba055fb23cdb2f2 /test
parentb75a84bedacd8588d2cf955900af80fd767a7d20 (diff)
parent7f65b37a30cb0162711e3889edd35b2608ffa729 (diff)
downloadscala-5dd4633e9a176bd103371c115f85303b9e0fdf98.tar.gz
scala-5dd4633e9a176bd103371c115f85303b9e0fdf98.tar.bz2
scala-5dd4633e9a176bd103371c115f85303b9e0fdf98.zip
Merge pull request #3388 from rklaehn/issue/7445
ListMap.tail is returning wrong result
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t6261.scala7
-rw-r--r--test/files/run/t7445.scala6
2 files changed, 6 insertions, 7 deletions
diff --git a/test/files/run/t6261.scala b/test/files/run/t6261.scala
index b4463256c9..bf6d640de3 100644
--- a/test/files/run/t6261.scala
+++ b/test/files/run/t6261.scala
@@ -2,12 +2,6 @@ import scala.collection.immutable._
object Test extends App {
- def test0() {
- val m=ListMap(1->2,3->4)
- if(m.tail ne m.tail)
- println("ListMap.tail uses a builder, so it is not O(1)")
- }
-
def test1() {
// test that a HashTrieMap with one leaf element is not created!
val x = HashMap.empty + (1->1) + (2->2)
@@ -92,7 +86,6 @@ object Test extends App {
// StructureTests.printStructure(z)
require(z.size == 2 && z.contains(a._1) && z.contains(c._1))
}
- test0()
test1()
test2()
test3()
diff --git a/test/files/run/t7445.scala b/test/files/run/t7445.scala
new file mode 100644
index 0000000000..e4ffeb8e1a
--- /dev/null
+++ b/test/files/run/t7445.scala
@@ -0,0 +1,6 @@
+import scala.collection.immutable.ListMap
+
+object Test extends App {
+ val a = ListMap(1 -> 1, 2 -> 2, 3 -> 3, 4 -> 4, 5 -> 5);
+ require(a.tail == ListMap(2 -> 2, 3 -> 3, 4 -> 4, 5 -> 5));
+}