Reorganize the flat 49-file test/ into three layers (jpm test recurses, so all
are still discovered):
- test/unit/ white-box component tests (reader, evaluator, types,
persistent-map, lazy-seq, macro, interop, compiler)
- test/integration/ cross-cutting + regression batteries (conformance, jank,
sci-bootstrap/runtime, features, systematic-coverage, api,
core, namespaces, ported clojure suites) and
.../ports/ ported clojure/cljs test batches pending consolidation
- test/spec/ the behavioral contract (built out in following commits)
- test/support/harness.janet shared defspec table runner (cases compared via
Jolt's own =, with a :throws sentinel) + expect= helpers
Files moved with git mv (history preserved) and import paths fixed for depth.
jpm test green. README Test section updated.
Next: build out test/spec/ to cover the public API area-by-area, mining the
integration batteries and filling gaps.
18 lines
658 B
Text
18 lines
658 B
Text
(use ../../../src/jolt/api)
|
|
(defn ct-eval [ctx s] (normalize-pvecs (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")
|