diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/unittest_collection.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/unittest_collection.scala b/test/files/run/unittest_collection.scala index 6d2a34cfb9..5d7ab97425 100644 --- a/test/files/run/unittest_collection.scala +++ b/test/files/run/unittest_collection.scala @@ -38,6 +38,14 @@ object Test { // clear x.clear assertEquals("length F ", x.length, 0) + + // copyToBuffer + x += "a" + x += "b" + val dest = new ArrayBuffer[String] + x copyToBuffer dest + assertEquals("dest", List("a", "b"), dest.toList) + assertEquals("source", List("a", "b"), x.toList) } } |