| 
									
										
										
										
											2019-05-02 07:16:55 +00:00
										 |  |  | #ifndef _MOO_T_T_H_
 | 
					
						
							|  |  |  | #define _MOO_T_T_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <stdio.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-03 06:49:57 +00:00
										 |  |  | #if defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L)
 | 
					
						
							| 
									
										
										
										
											2019-05-03 07:28:40 +00:00
										 |  |  | #	define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s:%s[%d] - %s\n", __FILE__, __func__, (int)__LINE__, msg1)
 | 
					
						
							|  |  |  | #	define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s:%s[%d] - %s - %s\n", __FILE__, __func__, (int)__LINE__, msg1, msg2)
 | 
					
						
							| 
									
										
										
										
											2019-05-03 06:49:57 +00:00
										 |  |  | #else
 | 
					
						
							| 
									
										
										
										
											2019-05-03 07:23:48 +00:00
										 |  |  | #	define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s[%d] - %s\n", __FILE__, (int)__LINE__, msg1)
 | 
					
						
							|  |  |  | #	define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s[%d] - %s - %s\n", __FILE__, (int)__LINE__, msg1, msg2)
 | 
					
						
							| 
									
										
										
										
											2019-05-03 06:49:57 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-02 07:16:55 +00:00
										 |  |  | #define T_ASSERT1(test,msg1) do { if (!(test)) { T_ASSERT_FAIL1(msg1); goto oops; } } while(0)
 | 
					
						
							|  |  |  | #define T_ASSERT2(test,msg1,msg2) do { if (!(test)) { T_ASSERT_FAIL2(msg1,msg2); goto oops; } } while(0)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |