#pragma once #include "log/Log.h" #include "panic/hang.h" #define __call_assert_fail(...) \ kerrorln(__VA_ARGS__); \ hang(); #define ASSERT(expr) \ do { \ if (!(expr)) { __call_assert_fail("Assertion failed at %s, line %d: %s", __FILE__, __LINE__, #expr) } \ } while (0) #define TODO(message) __call_assert_fail("TODO at %s, line %d: %s", __FILE__, __LINE__, message)