- SCI bootstrap complete: all 9 SCI source files load (317 forms, 0 failures) - prefer-method/remove-method/remove-all-methods promoted to special forms - eval special form (interpreter + compiler) with eval-test.janet - lazy-cat macro with structural equality tests in lazy-test.janet - Janet-native interop via . special form on tables/structs: field access (. obj :key), method calls (. obj method args...) fn* form compilation support, .- reader sugar interop-test.janet with 7 test sections (14 assertions) - New core bindings: with-meta, var-dynamic?, load-string - ^:dynamic def handler, core-str nil handling, core-meta for with-meta - 7 new CLJS ported test files: cljs-port-6 through -10, cljs-core-test, cljs-collections-test - test-sci-runtime.janet verifies SCI namespaces/types/Var/IBox/IVar - 317/317 tests pass, 0 failing scripts, 440+ assertions across 31 test files - README updated with Janet interop documentation
18 lines
634 B
Text
18 lines
634 B
Text
(use ../src/jolt/api)
|
|
(defn ct-eval [ctx s] (eval-string ctx s))
|
|
(print "=== CLJS Ported Part 9 ===")
|
|
|
|
(print "40: seq predicates...")
|
|
(let [ctx (init)]
|
|
(assert (= true (ct-eval ctx "(empty? [])")) "empty? true")
|
|
(assert (= false (ct-eval ctx "(empty? [1])")) "empty? false")
|
|
(assert (= true (ct-eval ctx "(every? pos? [1 2 3])")) "every? pos"))
|
|
(print " ok")
|
|
|
|
(print "41: complement...")
|
|
(let [ctx (init)]
|
|
(assert (= false (ct-eval ctx "((complement pos?) 1)")) "complement pos")
|
|
(assert (= true (ct-eval ctx "((complement pos?) -1)")) "complement neg"))
|
|
(print " ok")
|
|
|
|
(print "\nAll CLJS Ported Part 9 tests passed!\n")
|