Formatting

This commit is contained in:
Imbus 2024-03-27 12:12:44 +01:00
parent 404f821ef3
commit aff21d0593

View file

@ -3,18 +3,18 @@
#include "tree.h"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_RESET "\x1b[0m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_RESET "\x1b[0m"
int assert(bool condition, const char *message) {
if (!condition) {
printf(ANSI_COLOR_RED "Assertion failed: %s\n" ANSI_COLOR_RESET, message);
exit(1);
} else {
printf(ANSI_COLOR_GREEN "Assertion passed: %s\n" ANSI_COLOR_RESET, message);
}
return 0;
if (!condition) {
printf(ANSI_COLOR_RED "Assertion failed: %s\n" ANSI_COLOR_RESET, message);
exit(1);
} else {
printf(ANSI_COLOR_GREEN "Assertion passed: %s\n" ANSI_COLOR_RESET, message);
}
return 0;
}
int main(void) {