This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.

Testing

~import std/testing

Koru Testing Framework

testing.kz · 5 tors · ~[comptime]

Koru Testing Framework · 16 more lines
Koru Testing Framework Compiler-guided test development with automatic mock detection. Usage: test(User cannot withdraw more than balance) { account.balance = amount 50 app:withdraw(amount: 100) | insufficient_funds |> assert.ok() } The compiler: 1. Traces the flow to find impure events 2. Errors if impure event not mocked 3. Errors if mock is unused 4. Generates Zig test block

test

keywordcomptimetransform koru_std/testing.kz:256

validate-mocks

comptimeretain koru_std/testing.kz:265

test.with-harness

keywordcomptimetransform koru_std/testing.kz:874

test.harness

keywordcomptimetransform koru_std/testing.kz:881

test.property.equivalent

comptimetransform koru_std/testing.kz:897