Function expect [src]

This function is intended to be used only in tests. When ok is false, returns a test failure error.

Prototype

pub fn expect(ok: bool) !void

Parameters

ok: bool

Source

pub fn expect(ok: bool) !void { if (!ok) return error.TestUnexpectedResult; }