mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
assert.h: inital implementation
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
#ifndef _ASSERT_H_INCLUDE
|
||||||
|
#define _ASSERT_H_INCLUDE
|
||||||
|
|
||||||
|
#include <arch/panic.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define __assert(condition) if(!(condition) && printf("in file %s in func %s in line %d: assert %s failed\n", __FILE__, __func__, __LINE__, #condition)) _panic("Assert failed", NULL);
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user