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
20
README.md
20
README.md
|
|
@ -87,10 +87,26 @@ Supported and Clojure-compatible: chars as a distinct type, lazy/infinite sequen
|
|||
## Test
|
||||
|
||||
```
|
||||
jpm test # full test suite
|
||||
janet test/conformance.janet # Clojure-conformance battery
|
||||
jpm test # full suite (recurses test/)
|
||||
janet test/spec/sequences-spec.janet # a single spec
|
||||
janet test/integration/conformance-test.janet
|
||||
```
|
||||
|
||||
Tests are organized in three layers:
|
||||
|
||||
- **`test/spec/`** — the contract. Black-box, behavior-defining tables (one file
|
||||
per public API area) that collectively pin down Jolt's defined behavior. This
|
||||
is the authoritative description of what Jolt promises.
|
||||
- **`test/integration/`** — cross-cutting and regression batteries: the Clojure
|
||||
conformance suite, SCI bootstrap/runtime loading, jank conformance, and ported
|
||||
Clojure/CLJS test batches (`test/integration/ports/`).
|
||||
- **`test/unit/`** — white-box tests for individual components (reader,
|
||||
evaluator, types, persistent collections, regex, compiler).
|
||||
|
||||
`test/support/harness.janet` provides the shared `defspec` table runner (cases
|
||||
are `["label" expected actual]`, compared with Jolt's own `=`) plus
|
||||
`expect=`/`expect-throws` for unit tests.
|
||||
|
||||
## License
|
||||
|
||||
[Eclipse Public License 1.0](https://opensource.org/licenses/EPL-1.0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue