ทดสอบ
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Defines a single test case.
Aliases: test, it
Syntax: ทดสอบ <name> [modifiers] <block>
Category#
testing
Related#
Examples#
radix/corpus/proba/proba.fab (canonical · keyword)#
Defines a single test case.
# =============================================================================
# ทดสอบ — Defines a single test case.
# =============================================================================
#
# What this teaches:
# • Individual test cases — `ทดสอบ` declares one test with a descriptive name
# and optional modifiers
# • Tests live inside `ทดสอบชุด` suites and contain `ยืนยัน` assertions
#
# Common mistakes:
# • Using `ยืนยัน` outside a `ทดสอบ`/`ทดสอบชุด` test block — `ยืนยัน` is deprecated in production code (WARN006).
#
# See also: ทดสอบชุด, ยืนยัน, ละเว้น, ค้าง
# =============================================================================
# ทดสอบ — single test case
#
# GRAMMAR:
# testDecl :← 'ทดสอบ' stringLit block
#
# EXPECTED OUTPUT:
# No เริ่ม — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test case (whitelist: ทดสอบ/proba.fab). Cross-ref: ทดสอบชุด/probandum.fab.
#
test "arithmetic passes" แท็ก "math" {
assert 1 + 1 ≡ 2
}