diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-17 17:25:25 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-11-17 17:25:25 +0000 |
commit | d41da608a37fa74ae17042a837a77c01d1e1f9ea (patch) | |
tree | 7f250b0210e53b46d5bd0cae28fe16ccc982e1d1 /test/files | |
parent | 4c1cae0ef2772574a85d49f939b12c0e515aa6bd (diff) | |
download | scala-d41da608a37fa74ae17042a837a77c01d1e1f9ea.tar.gz scala-d41da608a37fa74ae17042a837a77c01d1e1f9ea.tar.bz2 scala-d41da608a37fa74ae17042a837a77c01d1e1f9ea.zip |
Added another fix for #3970.
No review.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t3970.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/t3970.scala b/test/files/run/t3970.scala new file mode 100644 index 0000000000..35b5ce6e1b --- /dev/null +++ b/test/files/run/t3970.scala @@ -0,0 +1,21 @@ + + + +import collection.mutable._ + + + +object Test { + def main(args: Array[String]) { + val dl = DoubleLinkedList[Int]() + dl.remove() + + val dl2 = DoubleLinkedList[Int](1, 2, 3) + dl2.next.remove() + assert(dl2 == DoubleLinkedList(1, 3)) + + val dl3 = DoubleLinkedList[Int](1, 2, 3) + assert(dl3.drop(1) == DoubleLinkedList(2, 3)) + assert(dl3.drop(1).prev == null) + } +} |