omnia
Translation status: العربية reader-locale proof. Code fences render through the ar pipeline; prose is canonical Latin.
Marks a test hook as applying to every case.
Syntax: omnia
Category#
testing
Related#
Examples#
radix/corpus/omnia/omnia.fab (canonical · keyword)#
Marks a test hook as applying to every case.
# =============================================================================
# omnia — Marks a test hook as applying to every case.
# =============================================================================
#
# What this teaches:
# • Exhaustive matching — `discerne omnia` requires every variant of a `discretio` to have a `casu` branch.
# • Safety guarantee — The compiler rejects incomplete matches, eliminating forgotten variant bugs.
#
# Common mistakes:
# • Using ceterum with discerne omnia — omnia forbids catchall arms; list every variant explicitly.
#
# See also: praepara, postpara
# =============================================================================
# omnia — exhaustive discerne (must cover every variant)
#
# discerne omnia <discretio> { casu <Variant> { … } … }
#
# GRAMMAR:
# matchStmt :← 'discerne' 'omnia' expr '{' casuClause* '}'
#
# EXPECTED OUTPUT:
# none — stdout not pinned for this exemplum.
union Condicio {
Activa,
Quietus
}
fn narra(Condicio condicio) → string {
# every variant must have a casu
match all condicio {
case Activa { return "activa" }
case Quietus { return "quietus" }
}
}
main {
const _ condicio ← variant Activa
print narra(condicio)
}Expected output:
activa