mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	We use a simple test-runner helper that runs each test in a separate process and reports the pass/fail rate at the end.
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			276 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			276 B
		
	
	
	
		
			C
		
	
	
	
	
	
struct test {
 | 
						|
	const char *name;
 | 
						|
	void (*run)(void);
 | 
						|
};
 | 
						|
 | 
						|
#define TEST(name)						\
 | 
						|
	static void name(void);					\
 | 
						|
								\
 | 
						|
	const struct test test##name			\
 | 
						|
		 __attribute__ ((section ("test_section"))) = {	\
 | 
						|
		#name, name					\
 | 
						|
	};							\
 | 
						|
								\
 | 
						|
	static void name(void)
 |