Formatting
This commit is contained in:
		
							parent
							
								
									404f821ef3
								
							
						
					
					
						commit
						aff21d0593
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		
							
								
								
									
										20
									
								
								src/main.c
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								src/main.c
									
										
									
									
									
								
							|  | @ -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) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Imbus
						Imbus