Static copy
Copied from docs/guides/testing.md in https://github.com/poppy-team/ori-lang (MIT). Pinned to revision 42e1817227fbc96e8e4a4a85fac78b3fec0a0e0f, blob 2c9ba86c2efae69496088e9b4443383b13808e38. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.
Portuguese (maintainer-oriented manual): testing.pt-BR.md
Surface: S3 / workspace undercompiler/
Mark tests with @test and run:
module app.main
import ori.test as test
@test
adds()
test.assert(1 + 1 == 2, "add")
end
main()
endori test main.orl
ori test main.orl --filter addsAsync tests are supported when the function is async and uses await (native backend). Put @test on the line before the function, then add the async modifier to the function declaration:
module app.async_tests
imports
ori.task = task
ori.test = test
end
@test
async async_check()
await task.sleep(1)
test.assert(true, "async test should run")
endSee compiler/crates/ori-driver/tests/concurrency_async.rs for compiler-side coverage.
Optional leak check:
ORI_TEST_LEAK_CHECK=1 ori test main.orlCodegen coverage targets native AOT/JIT, linking, generated C FFI headers, and runtime symbols. Validate AOT/JIT parity on their shared support surface; C/FFI host sanitizers remain distinct from instrumenting generated native code.
From the repository root:
cd compiler
cargo check --workspace
cargo test --workspace
cargo test -p ori-driver --test multifile_imports
cargo test -p ori-driver --test diagnostic_catalogRelease-style package smoke (needs system linker):
sh tools/smoke_native_release.sh
sh tools/smoke_no_rust.sh --package-root … --allow-rust-on-pathSee root AGENTS.md for staging the native runtime and env vars.
Editor DX smokes (local only):
./tools/smoke_vscode_extension.sh
# Zed: install extensions/zed-ori as a dev extension (see its README)