aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 18:15:19 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-09 23:14:02 +0200
commitdad71ca7c5311c5741aecc497de83f02d5f35f6e (patch)
tree17d91106a693a98b2620d5c5eae52cd9cc67abac /tests/untried/pos
parent74957b3b20aae3a0a2c7a41000c5a1424586f412 (diff)
downloaddotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.tar.gz
dotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.tar.bz2
dotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.zip
Ensure spaces after `if` in Dotty tests.
Diffstat (limited to 'tests/untried/pos')
-rw-r--r--tests/untried/pos/spec-sparsearray-new.scala2
-rw-r--r--tests/untried/pos/spec-sparsearray-old.scala2
-rw-r--r--tests/untried/pos/sudoku.scala2
-rw-r--r--tests/untried/pos/t262.scala2
-rw-r--r--tests/untried/pos/t3670.scala4
-rw-r--r--tests/untried/pos/unapplyComplex.scala4
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/untried/pos/spec-sparsearray-new.scala b/tests/untried/pos/spec-sparsearray-new.scala
index df31089fe..4903b1722 100644
--- a/tests/untried/pos/spec-sparsearray-new.scala
+++ b/tests/untried/pos/spec-sparsearray-new.scala
@@ -4,7 +4,7 @@ import scala.collection.mutable.MapLike
class SparseArray[@specialized(Int) T:ClassTag] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
override def get(x: Int) = {
val ind = findOffset(x)
- if(ind < 0) None else Some(sys.error("ignore"))
+ if (ind < 0) None else Some(sys.error("ignore"))
}
/**
diff --git a/tests/untried/pos/spec-sparsearray-old.scala b/tests/untried/pos/spec-sparsearray-old.scala
index e10dabd54..99a6309cc 100644
--- a/tests/untried/pos/spec-sparsearray-old.scala
+++ b/tests/untried/pos/spec-sparsearray-old.scala
@@ -3,7 +3,7 @@ import scala.collection.mutable.MapLike
class SparseArray[@specialized(Int) T:ClassManifest] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
override def get(x: Int) = {
val ind = findOffset(x)
- if(ind < 0) None else Some(sys.error("ignore"))
+ if (ind < 0) None else Some(sys.error("ignore"))
}
/**
diff --git a/tests/untried/pos/sudoku.scala b/tests/untried/pos/sudoku.scala
index 44c59b978..150586716 100644
--- a/tests/untried/pos/sudoku.scala
+++ b/tests/untried/pos/sudoku.scala
@@ -17,7 +17,7 @@ object SudokuSolver extends App {
// Looping over a half-closed range of consecutive integers [l..u)
// is factored out into a higher-order function
def fold(f: (Int, Int) => Int, accu: Int, l: Int, u: Int): Int =
- if(l==u) accu else fold(f, f(accu, l), l + 1, u)
+ if (l==u) accu else fold(f, f(accu, l), l + 1, u)
// The search function examines each position on the board in turn,
// trying the numbers 1..9 in each unfilled position
diff --git a/tests/untried/pos/t262.scala b/tests/untried/pos/t262.scala
index ec6187b36..9f7686a8f 100644
--- a/tests/untried/pos/t262.scala
+++ b/tests/untried/pos/t262.scala
@@ -3,7 +3,7 @@ object O {
def f:A;
}
class B extends A {
- def f = if(1 == 2) new C else new D;
+ def f = if (1 == 2) new C else new D;
}
class C extends A {
def f = this;
diff --git a/tests/untried/pos/t3670.scala b/tests/untried/pos/t3670.scala
index ec4fbe5b4..4eb7cebbc 100644
--- a/tests/untried/pos/t3670.scala
+++ b/tests/untried/pos/t3670.scala
@@ -25,7 +25,7 @@ class B {
class C {
val things = List("things")
- if(things.size < 100) {
+ if (things.size < 100) {
lazy val msg = "foo"
msg
}
@@ -33,7 +33,7 @@ class C {
class D {
val things = List("things")
- if(things.size < 100) {
+ if (things.size < 100) {
if (things.size > 10) {
lazy val msg = "foo"
msg
diff --git a/tests/untried/pos/unapplyComplex.scala b/tests/untried/pos/unapplyComplex.scala
index 8e0fe7821..5261b70f4 100644
--- a/tests/untried/pos/unapplyComplex.scala
+++ b/tests/untried/pos/unapplyComplex.scala
@@ -12,14 +12,14 @@ class ComplexPolar(val _1: Double, val _2: Double) extends Complex {
object ComplexRect {
def unapply(z:Complex): Option[Complex] = {
- if(z.isInstanceOf[ComplexRect]) Some(z) else z match {
+ if (z.isInstanceOf[ComplexRect]) Some(z) else z match {
case ComplexPolar(mod, arg) =>
Some(new ComplexRect(mod*math.cos(arg), mod*math.sin(arg)))
} } }
object ComplexPolar {
def unapply(z:Complex): Option[Complex] = {
- if(z.isInstanceOf[ComplexPolar]) Some(z) else z match {
+ if (z.isInstanceOf[ComplexPolar]) Some(z) else z match {
case ComplexRect(re,im) =>
Some(new ComplexPolar(math.sqrt(re*re + im*im), math.atan(re/im)))
} } }