Skip to content
Snippets Groups Projects
Commit 21b80c8b authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Making sure all errors are kept

parent 3cee85d7
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ trait LeonTestSuite extends FunSuite with Timeouts with BeforeAndAfterEach {
case fe: LeonFatalError =>
testContext.reporter match {
case sr: TestSilentReporter =>
throw new TestFailedException(sr.lastError.getOrElse("Some error"), fe, 5)
throw new TestFailedException(sr.lastErrors.mkString("\n"), fe, 5)
}
}
}
......
......@@ -4,10 +4,11 @@ package leon
package test
class TestSilentReporter extends DefaultReporter(Settings()) {
var lastError: Option[String] = None
var lastErrors: List[String] = Nil
override def emit(msg: Message): Unit = msg match {
case Message(this.ERROR, _, msg) => lastError = Some(msg.toString)
case Message(this.ERROR, _, msg) => lastErrors ++= List(msg.toString)
case Message(this.FATAL, _, msg) => lastErrors ++= List(msg.toString)
case _ =>
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment