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

One reporter per test case, to avoid fatals from breaking other tests

parent aef80512
No related branches found
No related tags found
No related merge requests found
...@@ -11,13 +11,6 @@ class RepairSuite extends LeonTestSuite { ...@@ -11,13 +11,6 @@ class RepairSuite extends LeonTestSuite {
PreprocessingPhase andThen PreprocessingPhase andThen
RepairPhase RepairPhase
val settings = Settings(verify = false, repair = true)
val reporter = new TestSilentReporter
val ctx0 = LeonContext(
reporter,
new InterruptManager(reporter)
)
val fileToFun = Map( val fileToFun = Map(
"Compiler1.scala" -> "desugar", "Compiler1.scala" -> "desugar",
"Heap4.scala" -> "merge", "Heap4.scala" -> "merge",
...@@ -29,12 +22,20 @@ class RepairSuite extends LeonTestSuite { ...@@ -29,12 +22,20 @@ class RepairSuite extends LeonTestSuite {
for (file <- filesInResourceDir("regression/repair/")) { for (file <- filesInResourceDir("regression/repair/")) {
val path = file.getAbsoluteFile().toString val path = file.getAbsoluteFile().toString
val name = file.getName() val name = file.getName()
val option = LeonValueOption("functions", fileToFun(name))
val ctx = ctx0.copy(options = option +: ctx0.options) val reporter = new TestSilentReporter
val ctx = LeonContext(
reporter = reporter,
interruptManager = new InterruptManager(reporter),
options = Seq(LeonValueOption("functions", fileToFun(name)))
)
test(name) { test(name) {
pipeline.run(ctx)(List(path)) pipeline.run(ctx)(List(path))
if(reporter.errorCount > 0) {
fail("Errors during repair!")
}
} }
} }
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment