验题
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.
Groups related test cases into a named suite.
Aliases: describe, suite
Syntax: 验题 <name> [modifiers] <block>
Category#
testing
Related#
Examples#
radix/corpus/probandum/probandum.fab (canonical · keyword)#
Groups related test cases into a named suite.
# =============================================================================
# 验题 — Groups related test cases into a named suite.
# =============================================================================
#
# What this teaches:
# • Test suite grouping — `验题` organizes related `测试` test cases
# under a descriptive name
# • Suites can be nested to create hierarchical test organization
#
# Common mistakes:
# • Placing `测试` outside a `验题` suite, or forgetting a `tag` modifier on the test case.
#
# See also: 测试, 断言
# =============================================================================
# 验题 / 测试 — declaration-only test suites
#
# 验题 "name" { 测试 "case" { 断言 expr } … } -- test group
# 验题 "nested" { 验题 "inner" { … } } -- nested suite
#
# GRAMMAR:
# probandumDecl :← '验题' stringLit block
# probaDecl :← '测试' stringLit block
#
# EXPECTED OUTPUT:
# No stdout — 断言 cases produce no 显示 output when run as tests.
#
# BACKEND: No 入口 block — test-runner surface; exempla e2e whitelists as
# declaration-only (whitelist: 验题/probandum.fab).
describe "arithmetica" {
test "unum plus unum" {
assert 1 + 1 ≡ 2
}
test "multiplicatio" {
assert 3 * 4 ≡ 12
}
describe "implicata" {
test "comparatio" {
const _ x ← 10
assert x ≥ 10
}
}
}