This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 10/5/2026.
Testing.assert
~import std/testing.assertKoru Standard Library: the `assert` part of testing.kz.
testing.assert.kz · 3 tors
Koru Standard Library: the `assert` part of testing.kz.
Joined via `~part assert` in testing.kz; merged into the testing module at load.
Assertions
Pass-through assertion checkpoint
Usage: assert(u.name == "Alice") |> next_step()
Panics with message if expression is false, otherwise continues
// Koru Standard Library: the `assert` part of testing.kz.
// Joined via `~part assert` in testing.kz; merged into the testing module at load.
//
// Assertions
//
// Pass-through assertion checkpoint
// Usage: assert(u.name == "Alice") |> next_step()
// Panics with message if expression is false, otherwise continues
~[keyword|comptime|transform|pure] pub tor assert {
expr: Expression,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
allocator: std.mem.Allocator
} -> SiteResult// Simple pass - marks a test branch as passing (noop)
~[keyword|comptime|transform|pure] pub tor assert.ok {}// Simple fail - fails the test with optional message
~[keyword] pub tor assert.fail { message: ?string }