ทดสอบชุด
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH 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
}
}
}