Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/std/testing/index.nct

index.nct

//! Assertions for native Nocter tests.
//!
//! These are ordinary fallible functions. Assertion failure therefore uses the same Error
//! propagation, process cleanup, and reporting path as application failures.

see ./assertions.nct

/// Fails with an assertion error unless `condition` is true.
pub func assert(condition: bool): void!

/// Fails unless two borrowed values satisfy their structural equality requirement.
pub func assert_eq<T>(actual: &T, expected: &T): void! where (&T == &T): bool