diff options
Diffstat (limited to 'test/src/TestLisp.kt')
-rw-r--r-- | test/src/TestLisp.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/src/TestLisp.kt b/test/src/TestLisp.kt index fa90468..1f0c424 100644 --- a/test/src/TestLisp.kt +++ b/test/src/TestLisp.kt @@ -1,9 +1,12 @@ import moe.nea.lisp.LispExecutionContext import moe.nea.lisp.LispParser +import moe.nea.lisp.TestResultFormatter import java.io.File +import javax.xml.stream.XMLOutputFactory object T + fun main() { val otherP = LispParser.parse(File(T::class.java.getResource("/test.lisp")!!.file)) val executionContext = LispExecutionContext() @@ -13,5 +16,9 @@ fun main() { LispParser.parse(File(T::class.java.getResource("/secondary.lisp")!!.file)) ) val bindings = executionContext.genBindings() - println("The results are in: ${executionContext.runTests(otherP, bindings)}") + val testResults = executionContext.runTests(otherP, "Test", bindings) + val w = XMLOutputFactory.newFactory() + .createXMLStreamWriter(File("TestOutput.xml").bufferedWriter()) + TestResultFormatter.write(w, listOf(testResults)) + w.close() } |