summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-06-10 10:27:45 +0000
committermichelou <michelou@epfl.ch>2008-06-10 10:27:45 +0000
commit0dabdc7b17a02f1d36a99cd21acfdc0b2498f951 (patch)
tree05e7999dc39a0faf11ca743d7314b178a9823026 /test/files/run
parent943f6dda3b32057a3d9e91c68baac8971d94e567 (diff)
downloadscala-0dabdc7b17a02f1d36a99cd21acfdc0b2498f951.tar.gz
scala-0dabdc7b17a02f1d36a99cd21acfdc0b2498f951.tar.bz2
scala-0dabdc7b17a02f1d36a99cd21acfdc0b2498f951.zip
int -> Int, etc..
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Course-2002-13.scala2
-rwxr-xr-xtest/files/run/bug1220.scala9
-rw-r--r--test/files/run/colltest.scala12
3 files changed, 12 insertions, 11 deletions
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala
index e98d8944a8..5b426be984 100644
--- a/test/files/run/Course-2002-13.scala
+++ b/test/files/run/Course-2002-13.scala
@@ -13,7 +13,7 @@ class Tokenizer(s: String, delimiters: String) extends Iterator[String] {
i < delimiters.length()
}
- def hasNext: boolean = {
+ def hasNext: Boolean = {
while (i < s.length() && s.charAt(i) <= ' ') { i = i + 1 }
i < s.length()
}
diff --git a/test/files/run/bug1220.scala b/test/files/run/bug1220.scala
index a992e5f2a5..88baa980f5 100755
--- a/test/files/run/bug1220.scala
+++ b/test/files/run/bug1220.scala
@@ -1,11 +1,12 @@
object Test extends Application {
- class QSRichIterable[A](self:Iterable[A]) {
- def filterMap[R](f: PartialFunction[A,R]) =
- self filter (f.isDefinedAt) map f
+
+ class QSRichIterable[A](self: Iterable[A]) {
+ def filterMap[R](f: PartialFunction[A,R]) =
+ self filter (f.isDefinedAt) map f
}
object Un {
- def unapply(i:int): Option[int] = Some(i)
+ def unapply(i: Int): Option[Int] = Some(i)
}
val richIter = new QSRichIterable(List(0, 1, 2, 3, 4))
diff --git a/test/files/run/colltest.scala b/test/files/run/colltest.scala
index 864753aca1..65c3676297 100644
--- a/test/files/run/colltest.scala
+++ b/test/files/run/colltest.scala
@@ -1,11 +1,11 @@
import collection.mutable._
-class TestSet(s0: Set[int], s1: Set[int]) {
+class TestSet(s0: Set[Int], s1: Set[Int]) {
val Iterations = 10
val Range = 100000
val testEachStep = false
val Threshold = 20000
val r = new java.util.Random(12345)
- def test(s: Set[int], n: int): Any = {
+ def test(s: Set[Int], n: Int): Any = {
val v = n >> 3
n & 7 match {
case 0 | 1 | 2 => s contains v
@@ -16,7 +16,7 @@ class TestSet(s0: Set[int], s1: Set[int]) {
case 7 => s.size
}
}
- def explain(n: int, s: Set[int]): String = n & 7 match {
+ def explain(n: Int, s: Set[Int]): String = n & 7 match {
case 0 | 1 | 2 => "contains"
case 3 => "add"
case 4 => "remove"
@@ -24,13 +24,13 @@ class TestSet(s0: Set[int], s1: Set[int]) {
case 6 => "add"
case 7 => "size"
}
- def checkSubSet(pre: String, s0: Set[int], s1: Set[int]) {
- for (val e <- s0.elements)
+ def checkSubSet(pre: String, s0: Set[Int], s1: Set[Int]) {
+ for (e <- s0.elements)
if (!(s1 contains e)) {
assert(false, pre+" element: "+e+"\n S0 = "+s0+"\n S1 = "+s1)
}
}
- for (val i <- 0 until Iterations) {
+ for (i <- 0 until Iterations) {
val n = r.nextInt(Range)
val res0 = test(s0, n)
val res1 = test(s1, n)