重复
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.
Repeats a test a fixed number of times.
Syntax: 重复 <number>
Category#
testing
Related#
Examples#
radix/corpus/repete/repete.fab (canonical · keyword)#
Repeats a test a fixed number of times.
# =============================================================================
# 重复 — Repeats a test a fixed number of times.
# =============================================================================
#
# What this teaches:
# • Test flakiness mitigation — `重复 <N>` runs a test case up to N times
# until it passes; useful for non-deterministic or flaky tests
# • Declared as a test modifier on `测试`
#
# Common mistakes:
# • Confusing `重复` (test repetition modifier) with `遍历` (loop iterator) or `执行`/`当` (loop constructs).
#
# See also: 易碎
# =============================================================================
# 重复 — repeat test modifier
#
# GRAMMAR:
# testModifier :← '重复' integer
#
# EXPECTED OUTPUT:
# No 入口 — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test modifier (whitelist: 重复/repete.fab).
#
test "flaky guard" repeat 2 {
assert true
}