ona/source/coral/debug.zig

11 lines
240 B
Zig
Raw Normal View History

2023-05-23 02:08:34 +02:00
///
/// Active code comment to assert that `condition` should always be true.
///
/// Safety-checked behavior is invoked where `condition` evaluates to false.
///
2023-04-19 01:25:35 +02:00
pub fn assert(condition: bool) void {
2023-05-23 02:08:34 +02:00
if (!condition) {
unreachable;
}
2023-04-19 01:25:35 +02:00
}