From 5bada810b4c7eda186aa40b94a78326520b3fa92 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 12 Jan 2011 02:49:08 +0000 Subject: Imported sbt.Process into trunk, in the guise o... Imported sbt.Process into trunk, in the guise of package scala.sys.process. It is largely indistinguishable from the version in sbt, at least from the outside. Also, I renamed package system to sys. I wanted to do that from the beginning and the desire has only grown since then. Sometimes a short identifier is just critical to usability: with a function like error("") called from hundreds of places, the difference between system.error and sys.error is too big. sys.error and sys.exit have good vibes (at least as good as the vibes can be for functions which error and exit.) Note: this is just the first cut. I need to check this in to finish fixing partest. I will be going over it with a comb and writing documentation which will leave you enchanted, as well as removing other bits which are now redundant or inferior. No review. --- src/scalacheck/org/scalacheck/Commands.scala | 4 ++-- src/scalacheck/org/scalacheck/ConsoleReporter.scala | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/scalacheck/org') diff --git a/src/scalacheck/org/scalacheck/Commands.scala b/src/scalacheck/org/scalacheck/Commands.scala index 5602eea151..952dd15953 100644 --- a/src/scalacheck/org/scalacheck/Commands.scala +++ b/src/scalacheck/org/scalacheck/Commands.scala @@ -26,7 +26,7 @@ trait Commands extends Prop { class Binding(private val key: State) { def get: Any = bindings.find(_._1 eq key) match { - case None => system.error("No value bound") + case None => sys.error("No value bound") case Some(x) => x } } @@ -139,7 +139,7 @@ trait Commands extends Prop { case Cmds(Nil, _) => proved case Cmds(c::cs, s::ss) => c.postCondition(s,c.nextState(s),c.run(s)) && runCommands(Cmds(cs,ss)) - case _ => system.error("Should not be here") + case _ => sys.error("Should not be here") } private def commandsProp: Prop = { diff --git a/src/scalacheck/org/scalacheck/ConsoleReporter.scala b/src/scalacheck/org/scalacheck/ConsoleReporter.scala index 5dc02b90ad..a94d32797f 100644 --- a/src/scalacheck/org/scalacheck/ConsoleReporter.scala +++ b/src/scalacheck/org/scalacheck/ConsoleReporter.scala @@ -79,10 +79,10 @@ object ConsoleReporter { res.status match { case Test.Proved(_) => {} case Test.Passed => {} - case f @ Test.Failed(_, _) => system.error(m + f) + case f @ Test.Failed(_, _) => sys.error(m + f) case Test.Exhausted => {} - case f @ Test.GenException(_) => system.error(m + f) - case f @ Test.PropException(_, _, _) => system.error(m + f) + case f @ Test.GenException(_) => sys.error(m + f) + case f @ Test.PropException(_, _, _) => sys.error(m + f) } } -- cgit v1.2.3