abla/test

Generated from source.

Import with import "abla/test".

Source: abla/test/entry.ab

__ablaTestChecks (var)

var __ablaTestChecks

Counts all checks recorded by the current test program.

__ablaTestFailures (var)

var __ablaTestFailures

Counts failed checks recorded by the current test program.

expect (fun)

fun expect(ok: bool, label: string): bool

Records a check named label and returns ok. A false result prints the label and counts as a failure without stopping the test.

__ablaTestExpectEqual (fun)

fun __ablaTestExpectEqual(
    equal: bool,
    actual: string,
    expected: string,
    label: string
): bool

Records and returns equal, printing the label and both formatted values when it is false.

expectEqual (fun)

fun expectEqual(actual: int, expected: int, label: string): bool

Compares integer actual and expected, records the check, and returns whether they match. On failure prints label and both values.

expectEqual (fun)

fun expectEqual(actual: string, expected: string, label: string): bool

Compares string actual and expected byte for byte and returns whether they match. On failure prints label and both quoted values.

expectEqual (fun)

fun expectEqual(actual: bool, expected: bool, label: string): bool

Compares boolean actual and expected, records the check, and returns whether they match. On failure prints label and both values.

expectEqual (fun)

fun expectEqual(actual: f64, expected: f64, label: string): bool

Compares actual and expected with ordinary f64 equality, without a tolerance. Records and returns the result. On failure prints label and both values.

testsPassed (fun)

fun testsPassed(): int

Prints "<n> checks, <m> failed"; 0 when every check held, else 1.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.