diff options
author | nea <nea@nea.moe> | 2023-08-10 18:01:37 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-10 18:01:37 +0200 |
commit | 873864974127ec4f123c7db0560235e806c3faab (patch) | |
tree | c1d39786d89dd39f7843a73c2d69e75a12894b36 /test/src/TestLisp.kt | |
parent | 0ab6dab185e31fcf6f3e0cf98dc8496f02448ee8 (diff) | |
download | nealisp-873864974127ec4f123c7db0560235e806c3faab.tar.gz nealisp-873864974127ec4f123c7db0560235e806c3faab.tar.bz2 nealisp-873864974127ec4f123c7db0560235e806c3faab.zip |
Add test junit formatter
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() } |