diff options
author | michelou <michelou@epfl.ch> | 2007-04-30 13:49:22 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-04-30 13:49:22 +0000 |
commit | 7f27845c6d16c9dcc15cf90c780ac4fd596a4f4f (patch) | |
tree | 863365f5f67769fbc1619b6d9323275e2a501e3b /test/files/run/fors.scala | |
parent | 12a2b3b7ebd680b7a461209c505ccab82b86b66b (diff) | |
download | scala-7f27845c6d16c9dcc15cf90c780ac4fd596a4f4f.tar.gz scala-7f27845c6d16c9dcc15cf90c780ac4fd596a4f4f.tar.bz2 scala-7f27845c6d16c9dcc15cf90c780ac4fd596a4f4f.zip |
fixed tests run/bridges.scala and jvm/inner.sca...
fixed tests run/bridges.scala and jvm/inner.scala on IBM J9
Diffstat (limited to 'test/files/run/fors.scala')
-rw-r--r-- | test/files/run/fors.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/fors.scala b/test/files/run/fors.scala index cd84649c15..7465b01287 100644 --- a/test/files/run/fors.scala +++ b/test/files/run/fors.scala @@ -13,6 +13,12 @@ object Test extends Application { val ar = "abc".toCharArray + val xml = + <html> + <head><title>Scala</title></head> + <body>{xs}</body> + </html>; + /////////////////// old syntax /////////////////// def testOld { @@ -42,6 +48,11 @@ object Test extends Application { x.toInt > 97) print(x + " "); println for {val x <- ar x.toInt > 97} print(x + " "); println + + // sequences + for (val x <- xml.child) println(x) + for (val x <- xml.child; + x.label == "head") println(x) } /////////////////// new syntax /////////////////// @@ -74,6 +85,10 @@ object Test extends Application { // arrays for (x <- ar) print(x + " "); println + + // sequences + for (x <- xml.child) println(x) + for (x <- xml.child if x.label == "head") println(x) } //////////////////////////////////////////////////// |