Luna/kernel/include/assert.h
2022-09-05 16:13:51 +02:00

9 lines
336 B
C

#pragma once
#include "log/Log.h"
extern bool __call_assert_fail(const char* function, const char* message);
#define __assert_fail(prefix, message) __call_assert_fail(__FUNCTION__, prefix message)
#define ASSERT(expr) (void)((expr) || __assert_fail("Assertion failed: ", #expr))
#define TODO(message) __assert_fail("TODO: ", message)