This commit is contained in:
peteraa 2020-06-29 16:19:56 +02:00
commit 2e37f0b8d7
17 changed files with 478 additions and 260 deletions

View file

@ -19,7 +19,7 @@ import LogParser._
object Manifest {
val singleTest = "forward2.s"
val singleTest = "addi.s"
val nopPadded = false
@ -96,3 +96,30 @@ class AllTests extends FlatSpec with Matchers {
}
}
}
/**
* Not tested at all
*/
class AllTestsWindows extends FlatSpec with Matchers {
it should "just werk" in {
val werks = getAllWindowsTestNames.filterNot(_ == "convolution.s").map{testname =>
say(s"testing $testname")
val opts = Manifest.allTestOptions(testname)
(testname, TestRunner.run(opts))
}
if(werks.foldLeft(true)(_ && _._2))
say(Console.GREEN + "All tests successful!" + Console.RESET)
else {
val success = werks.map(x => if(x._2) 1 else 0).sum
val total = werks.size
say(s"$success/$total tests successful")
werks.foreach{ case(name, success) =>
val msg = if(success) Console.GREEN + s"$name successful" + Console.RESET
else Console.RED + s"$name failed" + Console.RESET
say(msg)
}
}
}
}