Assertions that report both sides

pub fn assert_eq < AssertValue: Equatable + Printable > (got: AssertValue, want: AssertValue, what: text, file: text, line: integer)

Assert that two values are equal, naming BOTH of them when they are not.

assert(got == want, "…") puts the expected value in the CONDITION, so a failure says what was got and leaves the reader to recover what was wanted by reading the expression. This says both. Works on any type that is Equatable (op ==) and Printable (to_text) — every built-in scalar, and a user type defining both.

Failure behaves exactly as assert does, because it IS assert: the run aborts (and in --production logs an error instead), and the reported position is the CALLER's, not this function's. The file and line are injected by the compiler; do not pass them manually.

pub fn assert_ne < AssertValue: Equatable + Printable > (got: AssertValue, want: AssertValue, what: text, file: text, line: integer)

Assert that two values DIFFER, naming the value both sides share when they do not. The mirror of assert_eq; same bounds, same failure behaviour, same position injection.