summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-08-10 16:05:11 +0200
committernea <nea@nea.moe>2023-08-10 16:05:11 +0200
commit0ab6dab185e31fcf6f3e0cf98dc8496f02448ee8 (patch)
treef5e646246a888ba76f040a7ab81ca6a4d8cdee7c /test
parentf345fadd492ea5bb09e515d007be438fc08c9b93 (diff)
downloadnealisp-0ab6dab185e31fcf6f3e0cf98dc8496f02448ee8.tar.gz
nealisp-0ab6dab185e31fcf6f3e0cf98dc8496f02448ee8.tar.bz2
nealisp-0ab6dab185e31fcf6f3e0cf98dc8496f02448ee8.zip
Basic tests
Diffstat (limited to 'test')
-rw-r--r--test/res/test.lisp11
-rw-r--r--test/src/TestLisp.kt7
2 files changed, 15 insertions, 3 deletions
diff --git a/test/res/test.lisp b/test/res/test.lisp
index c4406b0..f3b870c 100644
--- a/test/res/test.lisp
+++ b/test/res/test.lisp
@@ -20,4 +20,13 @@
(debuglog "============")
(debuglog "This should fail" sc)
(import :secondary)
-(debuglog "This should work" sc) \ No newline at end of file
+(debuglog "This should work" sc)
+
+(debuglog "============")
+(debuglog "Running tests")
+(import :ntest)
+(ntest.test "Funny test" (seq
+ (debuglog "Funny test running")
+ (debuglog ((ntest.fail "Test failed")))))
+
+
diff --git a/test/src/TestLisp.kt b/test/src/TestLisp.kt
index 5563042..fa90468 100644
--- a/test/src/TestLisp.kt
+++ b/test/src/TestLisp.kt
@@ -8,7 +8,10 @@ fun main() {
val otherP = LispParser.parse(File(T::class.java.getResource("/test.lisp")!!.file))
val executionContext = LispExecutionContext()
executionContext.setupStandardBindings()
- executionContext.registerModule("secondary", LispParser.parse(File(T::class.java.getResource("/secondary.lisp")!!.file)))
+ executionContext.registerModule(
+ "secondary",
+ LispParser.parse(File(T::class.java.getResource("/secondary.lisp")!!.file))
+ )
val bindings = executionContext.genBindings()
- executionContext.executeProgram(bindings, otherP)
+ println("The results are in: ${executionContext.runTests(otherP, bindings)}")
}