You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							17 lines
						
					
					
						
							401 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							17 lines
						
					
					
						
							401 B
						
					
					
				| #include "test_I.h" | |
| #include <cln/input.h> | |
| #include <sstream> | |
|  | |
| int test_I_io (int iterations) | |
| { | |
| 	int error = 0; | |
| 	for (int i = iterations; i > 0; i--) { | |
| 		cl_I a = testrandom_I(); | |
| 		int base = iterations % (36-1) + 2; | |
| 		cl_read_flags rflags = {syntax_integer, lsyntax_standard, base}; | |
| 		stringstream buf; | |
| 		print_integer(buf, base, a); | |
| 		ASSERT1(a == read_integer(buf, rflags), a); | |
| 	} | |
| 	return error; | |
| }
 |