test: restructure into unit / integration / spec layers + shared harness
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.
This commit is contained in:
parent
1898308926
commit
16428179fa
52 changed files with 185 additions and 86 deletions
28
test/integration/bootstrap-test.janet
Normal file
28
test/integration/bootstrap-test.janet
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
(use ../../src/jolt/evaluator)
|
||||
(use ../../src/jolt/types)
|
||||
(use ../../src/jolt/reader)
|
||||
(use ../../src/jolt/api)
|
||||
|
||||
(def ctx (init))
|
||||
(def source (slurp "/Users/yogthos/src/sci/src/sci/impl/macros.cljc"))
|
||||
(var s source)
|
||||
(var count 0)
|
||||
|
||||
(while (> (length (string/trim s)) 0)
|
||||
(def [form rest] (parse-next s))
|
||||
(set s rest)
|
||||
(++ count)
|
||||
(if (not (nil? form))
|
||||
(do
|
||||
(printf "eval form %d..." count)
|
||||
(flush)
|
||||
(eval-form ctx @{} form)
|
||||
(printf " OK\n"))))
|
||||
|
||||
(printf "\n%d forms processed\n" count)
|
||||
(printf "ns: %s\n" (ctx-current-ns ctx))
|
||||
|
||||
(let [ns (ctx-find-ns ctx "sci.impl.macros")]
|
||||
(printf "sci.impl.macros bindings:\n")
|
||||
(loop [[name v] :pairs (ns :mappings)]
|
||||
(printf " %s: macro=%q\n" name (v :macro))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue