aboutsummaryrefslogtreecommitdiff
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
parent74957b3b20aae3a0a2c7a41000c5a1424586f412 (diff)
downloaddotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.tar.gz
dotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.tar.bz2
dotty-dad71ca7c5311c5741aecc497de83f02d5f35f6e.zip
Ensure spaces after `if` in Dotty tests.
-rw-r--r--tests/pending/pos/t4579.scala2
-rw-r--r--tests/pending/pos/t5012.scala2
-rw-r--r--tests/pending/pos/t5541.scala4
-rw-r--r--tests/pending/pos/tcpoly_seq.scala2
-rw-r--r--tests/pending/pos/tcpoly_seq_typealias.scala2
-rw-r--r--tests/pending/pos/unapplySeq.scala2
-rw-r--r--tests/pos/t262.scala2
-rw-r--r--tests/untried/neg/lubs.scala2
-rw-r--r--tests/untried/neg/t2275a.scala2
-rw-r--r--tests/untried/neg/t963b.scala2
-rw-r--r--tests/untried/neg/xmlcorner.scala2
-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
17 files changed, 20 insertions, 20 deletions
diff --git a/tests/pending/pos/t4579.scala b/tests/pending/pos/t4579.scala
index 0db527318..8ce657eff 100644
--- a/tests/pending/pos/t4579.scala
+++ b/tests/pending/pos/t4579.scala
@@ -400,7 +400,7 @@ object LispAny extends Lisp {
val globalEnv = EmptyEnvironment
.extend("=", Lambda{
- case List(arg1, arg2) => if(arg1 == arg2) 1 else 0})
+ case List(arg1, arg2) => if (arg1 == arg2) 1 else 0})
.extend("+", Lambda{
case List(arg1: Int, arg2: Int) => arg1 + arg2
case List(arg1: String, arg2: String) => arg1 + arg2})
diff --git a/tests/pending/pos/t5012.scala b/tests/pending/pos/t5012.scala
index 772b8f448..84404495c 100644
--- a/tests/pending/pos/t5012.scala
+++ b/tests/pending/pos/t5012.scala
@@ -4,7 +4,7 @@ class D {
class C {
def m: D = {
- if("abc".length == 0) {
+ if ("abc".length == 0) {
object p // (program point 2)
}
null
diff --git a/tests/pending/pos/t5541.scala b/tests/pending/pos/t5541.scala
index 90e5e4130..54e2b6518 100644
--- a/tests/pending/pos/t5541.scala
+++ b/tests/pending/pos/t5541.scala
@@ -36,9 +36,9 @@ class HASkipListView[ S <: Sys[ S ], A ]( private val l: HASkipList[ S, A ])( im
val szm = sz - 1
val keys = IndexedSeq.tabulate( sz ) { i =>
val key = n.key( i )
- (key, if( isRight && i == szm ) "M" else key.toString)
+ (key, if ( isRight && i == szm ) "M" else key.toString)
}
- val chbo = if( n.isLeaf ) None else {
+ val chbo = if ( n.isLeaf ) None else {
val nb = n.asBranch
Some( IndexedSeq.tabulate( sz )( i => buildBoxMap( nb.down( i ), isRight && (i == szm) )))
}
diff --git a/tests/pending/pos/tcpoly_seq.scala b/tests/pending/pos/tcpoly_seq.scala
index 731fe048a..e8711d1c4 100644
--- a/tests/pending/pos/tcpoly_seq.scala
+++ b/tests/pending/pos/tcpoly_seq.scala
@@ -125,7 +125,7 @@ trait HOSeq {
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
def head = hd
- def tail = if(tl==null) this else tl // hack
+ def tail = if (tl==null) this else tl // hack
override def isEmpty: Boolean = false
}
diff --git a/tests/pending/pos/tcpoly_seq_typealias.scala b/tests/pending/pos/tcpoly_seq_typealias.scala
index 8d2f6e7c3..b758ecd99 100644
--- a/tests/pending/pos/tcpoly_seq_typealias.scala
+++ b/tests/pending/pos/tcpoly_seq_typealias.scala
@@ -129,7 +129,7 @@ trait HOSeq {
// TODO: the var tl approach does not seem to work because subtyping isn't fully working yet
final case class ::[+b](hd: b, private val tl: List[b]) extends List[b] {
def head = hd
- def tail = if(tl==null) this else tl // hack
+ def tail = if (tl==null) this else tl // hack
override def isEmpty: Boolean = false
}
diff --git a/tests/pending/pos/unapplySeq.scala b/tests/pending/pos/unapplySeq.scala
index e642fd8d6..cefe1cb8f 100644
--- a/tests/pending/pos/unapplySeq.scala
+++ b/tests/pending/pos/unapplySeq.scala
@@ -1,6 +1,6 @@
object FooSeq {
def unapplySeq(x:Any): Option[Product2[Int,Seq[String]]] = {
- if(x.isInstanceOf[Bar]) {
+ if (x.isInstanceOf[Bar]) {
val y = x.asInstanceOf[Bar]
Some(y.size, y.name)
} else None
diff --git a/tests/pos/t262.scala b/tests/pos/t262.scala
index ec6187b36..9f7686a8f 100644
--- a/tests/pos/t262.scala
+++ b/tests/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/neg/lubs.scala b/tests/untried/neg/lubs.scala
index 3524fa4d8..bb6f7c286 100644
--- a/tests/untried/neg/lubs.scala
+++ b/tests/untried/neg/lubs.scala
@@ -3,7 +3,7 @@ object test1 {
class C extends A[C]
class D extends A[D]
- def f = if(1 == 2) new C else new D
+ def f = if (1 == 2) new C else new D
val x1: A[Any] = f
val x2: A[A[Any]] = f
diff --git a/tests/untried/neg/t2275a.scala b/tests/untried/neg/t2275a.scala
index 7f2b803da..8e25a38fe 100644
--- a/tests/untried/neg/t2275a.scala
+++ b/tests/untried/neg/t2275a.scala
@@ -1,5 +1,5 @@
object Test {
- if(true) {
+ if (true) {
<br>
}else{
<span>{"louenesee"}</span>
diff --git a/tests/untried/neg/t963b.scala b/tests/untried/neg/t963b.scala
index 3442f46c4..f3927cb09 100644
--- a/tests/untried/neg/t963b.scala
+++ b/tests/untried/neg/t963b.scala
@@ -10,7 +10,7 @@ object B {
var a : A = _
var b : Boolean = false
def y : A = {
- if(b) {
+ if (b) {
a = new A { type T = Int; var v = 1 }
a
} else {
diff --git a/tests/untried/neg/xmlcorner.scala b/tests/untried/neg/xmlcorner.scala
index 042ec05e6..671225186 100644
--- a/tests/untried/neg/xmlcorner.scala
+++ b/tests/untried/neg/xmlcorner.scala
@@ -11,7 +11,7 @@ object pos
def wrap(f : Int => Unit) = f(5)
wrap({ v =>
- if(v == 5) {
+ if (v == 5) {
val n = {
val m = (<a>{}</a>)
<div>{ v }</div>
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)))
} } }