Created
May 19, 2012 04:27
-
-
Save takezoe/2729103 to your computer and use it in GitHub Desktop.
An example which runs ScalaTest by program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest._ | |
import org.scalatest.events._ | |
/** | |
* An example which runs ScalaTest by program. | |
*/ | |
object RunScalaTest extends App { | |
// MySuite is a testsuite | |
new MySuite().run(None, new Reporter { | |
def apply(event: Event) = event match { | |
case e: TestStarting => print(e.testName + " ... ") | |
case e: TestSucceeded => println("succeeded.") | |
case e: TestFailed => println("failed."); println(e.message) | |
case e: TestPending => println("pending.") | |
case e: TestIgnored => println("ignored.") | |
case _ => | |
} | |
}, new Stopper {}, Filter(), Map[String, Any](), None, new Tracker()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment