Skip to content

Commit

Permalink
Made the tests runnable in Eclipse, which does not seem to call the "…
Browse files Browse the repository at this point in the history
…run" methods where configMap is set. To prevent a NullPointerException, configMap now defaults to an empty map.
  • Loading branch information
Korbinian Breu committed Aug 28, 2013
1 parent 8fb0b4b commit bd63649
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/semper/sil/testing/SilSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import semper.sil.frontend.Frontend
abstract class SilSuite extends FunSuite with TestAnnotationParser {

/** The config map passed to ScalaTest. */
protected var configMap: Map[String, Any] = _
protected var configMap: Map[String, Any] = Map[String, Any]()

private var _testsRegistered = false

Expand Down Expand Up @@ -437,6 +437,7 @@ abstract class SilSuite extends FunSuite with TestAnnotationParser {
protected override def runTests(testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker) {
this.configMap = configMap
registerTests()

super.runTests(testName, reporter, stopper, filter, configMap, distributor, tracker)
}

Expand Down

0 comments on commit bd63649

Please sign in to comment.