diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2008-03-07 13:42:56 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2008-03-07 13:42:56 +0000 |
commit | 060068379f97ed88544b145a63b9bfc7b8f01d8b (patch) | |
tree | 3a113ea209e9ecbd3240a3aaf0fe47477ad84787 /src | |
parent | fb31f764a21178353f78c032a7c1059d024dfe00 (diff) | |
download | scala-060068379f97ed88544b145a63b9bfc7b8f01d8b.tar.gz scala-060068379f97ed88544b145a63b9bfc7b8f01d8b.tar.bz2 scala-060068379f97ed88544b145a63b9bfc7b8f01d8b.zip |
Improved SuperSABBUS w.r.t.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Either.scala | 8 | ||||
-rw-r--r-- | src/library/scala/Left.scala | 16 | ||||
-rw-r--r-- | src/library/scala/Right.scala | 16 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/PartestTask.scala | 8 |
4 files changed, 39 insertions, 9 deletions
diff --git a/src/library/scala/Either.scala b/src/library/scala/Either.scala index 2e6d502251..474eafcb4b 100644 --- a/src/library/scala/Either.scala +++ b/src/library/scala/Either.scala @@ -446,14 +446,6 @@ sealed trait Either[+A, +B] { case Right(_) => None } } -/** - * The left side of the disjoin union, as opposed to the <code>Right</code> side. - */ -final case class Left[+A, +B](a: A) extends Either[A, B] -/** - * The right side of the disjoin union, as opposed to the <code>Left</code> side. - */ -final case class Right[+A, +B](b: B) extends Either[A, B] import Function.untupled diff --git a/src/library/scala/Left.scala b/src/library/scala/Left.scala new file mode 100644 index 0000000000..c2032db86b --- /dev/null +++ b/src/library/scala/Left.scala @@ -0,0 +1,16 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id: Either.scala 14320 2008-03-07 10:53:38Z washburn $ + +package scala + +/** + * The left side of the disjoin union, as opposed to the <code>Right</code> side. + */ +final case class Left[+A, +B](a: A) extends Either[A, B] diff --git a/src/library/scala/Right.scala b/src/library/scala/Right.scala new file mode 100644 index 0000000000..435f71d790 --- /dev/null +++ b/src/library/scala/Right.scala @@ -0,0 +1,16 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id: Either.scala 14320 2008-03-07 10:53:38Z washburn $ + +package scala + +/** + * The right side of the disjoin union, as opposed to the <code>Left</code> side. + */ +final case class Right[+A, +B](b: B) extends Either[A, B] diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala index 336272ccb2..22fb7b8dc1 100644 --- a/src/partest/scala/tools/partest/PartestTask.scala +++ b/src/partest/scala/tools/partest/PartestTask.scala @@ -50,6 +50,9 @@ class PartestTask extends Task { def setShowDiff(input: Boolean): Unit = showDiff = input + def setErrorOnFailed(input: Boolean): Unit = + errorOnFailed = input + private var classpath: Option[Path] = None private var javacmd: Option[File] = None private var showDiff: Boolean = false @@ -59,6 +62,7 @@ class PartestTask extends Task { private var negFiles: Option[FileSet] = None private var runFiles: Option[FileSet] = None private var residentFiles: Option[FileSet] = None + private var errorOnFailed: Boolean = false private def getPosFiles: Array[File] = if (!posFiles.isEmpty) { @@ -180,8 +184,10 @@ class PartestTask extends Task { log("There where no tests to run.") else if (allFailures == 0) log("Test suite finished with no failures.") + else if (errorOnFailed) + error("Test suite finished with " + allFailures + " case" + (if (allFailures > 1) "s" else "") + " failing.") else - log("Test suite finished with " + allFailures + " case" + (if (allFailures > 0) "s" else "") + " failing.") + log("Test suite finished with " + allFailures + " case" + (if (allFailures > 1) "s" else "") + " failing.") } |