Luna/kernel/include/assert.h

9 lines
336 B
C
Raw Normal View History

2022-09-05 14:13:51 +00:00
#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)