mong_đợi_thất_bại
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Marks a test as expected to fail.
Aliases: expect failure
Syntax: kiểm_thử <name> mong_đợi_thất_bại <block>
Category#
testing
Related#
Examples#
radix/corpus/erratur/erratur.fab (canonical · keyword)#
Marks a test as expected to fail.
# =============================================================================
# mong_đợi_thất_bại — Marks a test as expected to fail
# =============================================================================
#
# What this teaches:
# • Expected failure — `mong_đợi_thất_bại` records a test whose failing assertion is a known defect, with no argument.
# • Modifier position — it sits between the test name and the body, like `bỏ_qua` and `mong_manh`.
#
# Common mistakes:
# • Confusing mong_đợi_thất_bại (expected failure) with bỏ_qua (skipped) — an mong_đợi_thất_bại test still runs.
#
# See also: kiểm_thử, mong_manh, bỏ_qua
# =============================================================================
# mong_đợi_thất_bại — expected-failure test modifier
#
# GRAMMAR:
# testModifier :← 'mong_đợi_thất_bại'
#
# EXPECTED OUTPUT:
# mong_đợi_thất_bại declared
test "known defect" expect_failure {
assert 1 + 1 ≡ 3
}
main {
print "erratur declared"
}Expected output:
erratur declared