Kết xuấtvi

kiểm_thử

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

Defines a single test case.

Aliases: test, it

Syntax: kiểm_thử <name> [modifiers] <block>

Category#

testing

Examples#

radix/corpus/proba/proba.fab (canonical · keyword)#

Defines a single test case.

# =============================================================================
# kiểm_thử — Defines a single test case.
# =============================================================================
#
# What this teaches:
#   • Individual test cases — `kiểm_thử` declares one test with a descriptive name
#     and optional modifiers
#   • Tests live inside `đối_tượng_kiểm_thử` suites and contain `khẳng_định` assertions
#
# Common mistakes:
#   • Using `khẳng_định` outside a `kiểm_thử`/`đối_tượng_kiểm_thử` test block — `khẳng_định` is deprecated in production code (WARN006).
#
# See also: đối_tượng_kiểm_thử, khẳng_định, bỏ_qua, việc_cần_làm
# =============================================================================

# kiểm_thử — single test case
#
# GRAMMAR:
#   testDecl :← 'kiểm_thử' stringLit block
#
# EXPECTED OUTPUT:
#   No bắt_đầu — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only test case (whitelist: kiểm_thử/proba.fab). Cross-ref: đối_tượng_kiểm_thử/probandum.fab.
#

test "arithmetic passes" nhãn "math" {
    assert 1 + 1 ≡ 2
}