العرضar

الكل

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

Marks a test hook as applying to every case.

Syntax: الكل

Category#

testing

Examples#

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

Marks a test hook as applying to every case.

# =============================================================================
# الكل — Marks a test hook as applying to every case.
# =============================================================================
#
# What this teaches:
#   • Exhaustive matching — `طابق الكل` requires every variant of a `تمايز` to have a `حالة` branch.
#   • Safety guarantee — The compiler rejects incomplete matches, eliminating forgotten variant bugs.
#
# Common mistakes:
#   • Using افتراضي with طابق الكل — الكل forbids catchall arms; list every variant explicitly.
#
# See also: جهز, لاحق
# =============================================================================

# الكل — exhaustive طابق (must cover every variant)
#
# طابق الكل <تمايز> { حالة <Variant> { … } … }
#
# GRAMMAR:
#   matchStmt :← 'طابق' 'الكل' 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 حالة
    match all condicio {
        case Activa {
            return "activa"
        }
        case Quietus {
            return "quietus"
        }
    }
}

main {
    const Condicio condicio ← variant Activa
    print narra(condicio)
}

Expected output:

activa