diff options
author | stepancheg <stepancheg@epfl.ch> | 2008-06-25 16:22:45 +0000 |
---|---|---|
committer | stepancheg <stepancheg@epfl.ch> | 2008-06-25 16:22:45 +0000 |
commit | 57e2d8157c32ac81a9a905720533cae4369914d9 (patch) | |
tree | 0642bd2ec41c2191a429e63916c87f16962dafb4 /test/files | |
parent | a42ff8849134be26df1cec510ed031f837d79abb (diff) | |
download | scala-57e2d8157c32ac81a9a905720533cae4369914d9.tar.gz scala-57e2d8157c32ac81a9a905720533cae4369914d9.tar.bz2 scala-57e2d8157c32ac81a9a905720533cae4369914d9.zip |
Seq.apply, RandomAccessSeq.apply
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/randomAccessSeq-apply.check | 1 | ||||
-rw-r--r-- | test/files/run/randomAccessSeq-apply.scala | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/randomAccessSeq-apply.check b/test/files/run/randomAccessSeq-apply.check new file mode 100644 index 0000000000..d86bac9de5 --- /dev/null +++ b/test/files/run/randomAccessSeq-apply.check @@ -0,0 +1 @@ +OK diff --git a/test/files/run/randomAccessSeq-apply.scala b/test/files/run/randomAccessSeq-apply.scala new file mode 100644 index 0000000000..863a4d42a2 --- /dev/null +++ b/test/files/run/randomAccessSeq-apply.scala @@ -0,0 +1,15 @@ +object Test extends Application { + val empty = RandomAccessSeq() + assert(empty.isEmpty) + + val single = RandomAccessSeq(1) + assert(List(1) == single.toList) + + val two = RandomAccessSeq("a", "b") + assert("a" == two.first) + assert("b" == two.apply(1)) + + println("OK") +} + +// vim: set ts=2 sw=2 et: |