Update tests base
This commit is contained in:
		
							parent
							
								
									8ed7159655
								
							
						
					
					
						commit
						ee602d91b9
					
				@ -9,6 +9,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void init(unsigned int seed) {
 | 
					static void init(unsigned int seed) {
 | 
				
			||||||
 | 
					    if (!seed) seed = time(0);
 | 
				
			||||||
    printf("\e[36mRandom module initialized with seed: \e[m\e[32m%u\n\e[m", seed);
 | 
					    printf("\e[36mRandom module initialized with seed: \e[m\e[32m%u\n\e[m", seed);
 | 
				
			||||||
    put_separator();
 | 
					    put_separator();
 | 
				
			||||||
    srand(seed);
 | 
					    srand(seed);
 | 
				
			||||||
@ -16,7 +17,7 @@ static void init(unsigned int seed) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int random_init(int argc, char** argv) {
 | 
					int random_init(int argc, char** argv) {
 | 
				
			||||||
    if (argc < 2) {
 | 
					    if (argc < 2) {
 | 
				
			||||||
        init(time(0));
 | 
					        init(0);
 | 
				
			||||||
    } else init(atol(argv[1]));
 | 
					    } else init(atol(argv[1]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					#ifndef __USE_MISC
 | 
				
			||||||
#define __USE_MISC
 | 
					#define __USE_MISC
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <sys/resource.h>
 | 
					#include <sys/resource.h>
 | 
				
			||||||
#include <sys/times.h>
 | 
					#include <sys/times.h>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user