From 7ecee9ad1a14bed1761acc4ef2ee2fe660a0833b Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Wed, 12 Jan 2011 08:33:52 +0000 Subject: Merge branch 'work' --- .../src/scala/collection/parallel/benchmarks/misc/Loader.scala | 10 ++++++---- test/files/neg/t2973.check | 4 ++++ test/files/neg/t2973.scala | 1 + test/files/pos/t2973.scala | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 test/files/neg/t2973.check create mode 100644 test/files/neg/t2973.scala create mode 100644 test/files/pos/t2973.scala (limited to 'test') diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala index 2a9fc2c3ef..1b73f2b868 100644 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala +++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala @@ -30,15 +30,17 @@ class Loader(val size: Int, val parallelism: Int, val runWhat: String) extends B reset + val wa = Dictionary.wordarray ++ Dictionary.wordarray ++ Dictionary.wordarray + def runseq { val m = Map( '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ" ) val charCode: Map[Char, Char] = for ((digit, letters) <- m; letter <- letters) yield letter -> digit - def wordCode(word: String): String = word.toUpperCase map charCode + def wordCode(word: String): String = (word.toUpperCase.toList map charCode).toString - Dictionary.wordarray groupBy wordCode + wa groupBy wordCode } def runpar { @@ -47,9 +49,9 @@ class Loader(val size: Int, val parallelism: Int, val runWhat: String) extends B '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ" ) val charCode: Map[Char, Char] = for ((digit, letters) <- m; letter <- letters) yield letter -> digit - def wordCode(word: String): String = word.toUpperCase map charCode + def wordCode(word: String): String = (word.toUpperCase.toList map charCode).toString - Dictionary.wordarray.par groupBy wordCode + wa.par groupBy wordCode } def reset = runWhat match { diff --git a/test/files/neg/t2973.check b/test/files/neg/t2973.check new file mode 100644 index 0000000000..582fe0063d --- /dev/null +++ b/test/files/neg/t2973.check @@ -0,0 +1,4 @@ +t2973.scala:1: error: ';' expected but 'package' found. +package foo {} package bar {} + ^ +one error found \ No newline at end of file diff --git a/test/files/neg/t2973.scala b/test/files/neg/t2973.scala new file mode 100644 index 0000000000..b9d973580a --- /dev/null +++ b/test/files/neg/t2973.scala @@ -0,0 +1 @@ +package foo {} package bar {} diff --git a/test/files/pos/t2973.scala b/test/files/pos/t2973.scala new file mode 100644 index 0000000000..f5dde856d9 --- /dev/null +++ b/test/files/pos/t2973.scala @@ -0,0 +1 @@ +package foo {}; package bar {}; package baz {} -- cgit v1.2.3