test
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Defines a single test case.
Aliases: test, it
Syntax: test <name> [modifiers] <block>
Category#
testing
Related#
Examples#
radix/corpus/proba/proba.fab (canonical · keyword)#
Defines a single test case.
# =============================================================================
# test — Defines a single test case.
# =============================================================================
#
# What this teaches:
# • Individual test cases — `test` declares one test with a descriptive name
# and optional modifiers
# • Tests live inside `describe` suites and contain `assert` assertions
#
# Common mistakes:
# • Using `assert` outside a `test`/`describe` test block — `assert` is deprecated in production code (WARN006).
#
# See also: describe, assert, skip, todo
# =============================================================================
# test — single test case
#
# GRAMMAR:
# testDecl :← 'test' stringLit block
#
# EXPECTED OUTPUT:
# No main — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test case (whitelist: test/proba.fab). Cross-ref: describe/probandum.fab.
#
test "arithmetic passes" tag "math" {
assert 1 + 1 ≡ 2
}