aboutsummaryrefslogtreecommitdiff
path: root/docs/design/test-coverage.md
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 07:55:08 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 07:55:08 +0000
commitd8da21a406f449d277c42b91d4c9bf8b20bd0dcc (patch)
tree79a4dbf6839eaee19aa626f1aa3981d5b0c19377 /docs/design/test-coverage.md
parentbuild: embed images with #embed, keep everything generated in build/ (diff)
embed: tests, editor support and docs; js vm file access; test fixes
embed declarations get accept and reject fixtures, a run-only image check through zc0, an lsp keyword hover and the grammar keyword. errors point at the declaration and still declare the name, so its uses are not reported again. zc0 tracks byte-string globals and lays embedded arrays out one word per element, the way its own indexing reads them. the command-line javascript vm reaches node's file system for the file syscalls, so include and embed work there; other embedders opt in. the web build is self-contained in build/web with its examples. README, BORROW and BOOTSTRAP-OWNERSHIP describe the new build and ownership rules, and ONBOARD.md is a reading and verification order for the code. the suite passes the map header to mklayout, the wasm fuzz program uses the include format, and lsp drivers scale their deadlines on hosts without the arm64 jit (ZC_TEST_TIMEOUT_SCALE). LLVM_CONFIG selects an llvm with headers for the llvm section.
Diffstat (limited to 'docs/design/test-coverage.md')
-rw-r--r--docs/design/test-coverage.md82
1 files changed, 41 insertions, 41 deletions
diff --git a/docs/design/test-coverage.md b/docs/design/test-coverage.md
index fae9356..e916df4 100644
--- a/docs/design/test-coverage.md
+++ b/docs/design/test-coverage.md
@@ -35,7 +35,7 @@ the `qualifiers` group in `toolchain_lsp_contract_test.js` checks both qualifier
## public standard-library documentation
-`src/lib/std.zc` documents public operations for output capture, numeric helpers, packed byte strings, host access, arenas, growable byte buffers, and array algorithms, including parameter and return behavior. the array algorithms document their callback roles, result types, traversal order, and reference sharing. `src/tools/embed.sh all --check` verifies that the compiler's embedded source matches the module. `hover_surface_test.js` and `hover_features_test.js` check selected embedded library documentation; they do not assert that every public function has a description. edge-case behavior for the broader standard-library API still needs dedicated acceptance tests.
+`src/lib/std.zc` documents public operations for output capture, numeric helpers, packed byte strings, host access, arenas, growable byte buffers, and array algorithms, including parameter and return behavior. the array algorithms document their callback roles, result types, traversal order, and reference sharing. the compiler carries the module through an `embed` declaration, so its embedded text is the module file as of the build. `hover_surface_test.js` and `hover_features_test.js` check selected embedded library documentation; they do not assert that every public function has a description. edge-case behavior for the broader standard-library API still needs dedicated acceptance tests.
## unused-argument hints
@@ -69,53 +69,53 @@ the formatter indents case labels one level inside their switch by default (`Cas
## focused commands
-run from the repository root. native binaries and the language server must already be built; the wasm command needs a built `src/web/zc.wasm`.
+run from the repository root. native binaries and the language server must already be built; the wasm command needs a built `build/web/zc.wasm` (`make web`).
```sh
-python3 tests/drivers/fuzz_compiler.py bin/zy bin/zym --js
-python3 tests/drivers/fuzz_malformed.py bin/zy bin/zym
-node tests/drivers/fuzz_wasm.js src/web/zc.wasm
-python3 tests/drivers/image_growth_test.py bin/zy
-python3 tests/drivers/code_emission_growth_test.py bin/zy
-python3 tests/drivers/code_address_growth_test.py bin/zy
+python3 tests/drivers/fuzz_compiler.py build/bin/zy build/bin/zym --js
+python3 tests/drivers/fuzz_malformed.py build/bin/zy build/bin/zym
+node tests/drivers/fuzz_wasm.js build/web/zc.wasm
+python3 tests/drivers/image_growth_test.py build/bin/zy
+python3 tests/drivers/code_emission_growth_test.py build/bin/zy
+python3 tests/drivers/code_address_growth_test.py build/bin/zy
python3 tests/drivers/seed_growth_test.py
python3 tests/drivers/memory_limits_test.py
-python3 tests/drivers/stack_growth_test.py bin/zy
+python3 tests/drivers/stack_growth_test.py build/bin/zy
python3 tests/drivers/layout_config_test.py
-python3 tests/drivers/compiler_growth_test.py bin/zy
-python3 tests/drivers/parser_growth_test.py bin/zy
-node tests/drivers/fuzz_lsp.js bin/zclsp
-node tests/drivers/lsp_growth_test.js bin/zclsp
-node tests/drivers/protocol_growth_test.js bin/zclsp
-node tests/drivers/core_lsp_test.js bin/zclsp
-node tests/drivers/hover_values_test.js bin/zclsp
-node tests/drivers/hover_features_test.js bin/zclsp
-node tests/drivers/hover_surface_test.js bin/zclsp
-CONTRACT_GROUP=inference node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=qualifiers node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-python3 tests/drivers/compiler_contract_test.py bin/zy --group qualifiers
-python3 tests/drivers/compiler_contract_test.py bin/zym --group qualifiers
-python3 tests/drivers/inference_growth_test.py bin/zclsp
-node tests/drivers/storage_analysis_test.js bin/zclsp
-node tests/drivers/hints_test.js bin/zclsp
-node tests/drivers/include_test.js bin/zclsp
-CONTRACT_GROUP=quickfix node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=modulehover node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=namespacecompletion node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=navigation node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
+python3 tests/drivers/compiler_growth_test.py build/bin/zy
+python3 tests/drivers/parser_growth_test.py build/bin/zy
+node tests/drivers/fuzz_lsp.js build/bin/zclsp
+node tests/drivers/lsp_growth_test.js build/bin/zclsp
+node tests/drivers/protocol_growth_test.js build/bin/zclsp
+node tests/drivers/core_lsp_test.js build/bin/zclsp
+node tests/drivers/hover_values_test.js build/bin/zclsp
+node tests/drivers/hover_features_test.js build/bin/zclsp
+node tests/drivers/hover_surface_test.js build/bin/zclsp
+CONTRACT_GROUP=inference node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=qualifiers node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+python3 tests/drivers/compiler_contract_test.py build/bin/zy --group qualifiers
+python3 tests/drivers/compiler_contract_test.py build/bin/zym --group qualifiers
+python3 tests/drivers/inference_growth_test.py build/bin/zclsp
+node tests/drivers/storage_analysis_test.js build/bin/zclsp
+node tests/drivers/hints_test.js build/bin/zclsp
+node tests/drivers/include_test.js build/bin/zclsp
+CONTRACT_GROUP=quickfix node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=modulehover node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=namespacecompletion node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=navigation node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
node tests/drivers/codeactions_client_test.js
node tests/drivers/ext_cache_test.js
-python3 tests/drivers/array_methods_test.py bin/zy
-python3 tests/drivers/array_methods_test.py bin/zy --case map
-python3 tests/drivers/array_methods_test.py bin/zy --case filter
-python3 tests/drivers/array_methods_test.py bin/zy --case search
-python3 tests/drivers/array_methods_test.py bin/zy --case reduce
+python3 tests/drivers/array_methods_test.py build/bin/zy
+python3 tests/drivers/array_methods_test.py build/bin/zy --case map
+python3 tests/drivers/array_methods_test.py build/bin/zy --case filter
+python3 tests/drivers/array_methods_test.py build/bin/zy --case search
+python3 tests/drivers/array_methods_test.py build/bin/zy --case reduce
python3 tests/drivers/cli_help_test.py
python3 tests/drivers/runtime_image_test.py
-CONTRACT_GROUP=magic node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=strings node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=arguments node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-CONTRACT_GROUP=modules node tests/drivers/toolchain_lsp_contract_test.js bin/zclsp
-node tests/drivers/nav_test.js bin/zclsp
-tests/runerr.sh bin/zy tests/errors
+CONTRACT_GROUP=magic node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=strings node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=arguments node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+CONTRACT_GROUP=modules node tests/drivers/toolchain_lsp_contract_test.js build/bin/zclsp
+node tests/drivers/nav_test.js build/bin/zclsp
+tests/runerr.sh build/bin/zy tests/errors
```