Skip to content
Extraits de code Groupes Projets
Valider f077eb31 rédigé par Laurent Paucot's avatar Laurent Paucot
Parcourir les fichiers

test

parent a5a6a885
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #5715 réussi
...@@ -411,7 +411,7 @@ void thread_create_join(struct buffer_rc *ptr1,struct buffer_cw *ptr2,struct buf ...@@ -411,7 +411,7 @@ void thread_create_join(struct buffer_rc *ptr1,struct buffer_cw *ptr2,struct buf
int run (char *input,char *output, int n_threads){ int run (char *input,char *output, int n_threads){
N = n_threads; N = n_threads;
printf("check2\n");
FILE *file1 = NULL; FILE *file1 = NULL;
FILE *file2 = NULL; FILE *file2 = NULL;
...@@ -436,7 +436,7 @@ int run (char *input,char *output, int n_threads){ ...@@ -436,7 +436,7 @@ int run (char *input,char *output, int n_threads){
sem_2_initializer(ptr2); sem_2_initializer(ptr2);
thread_create_join(ptr1,ptr2,ptr3); thread_create_join(ptr1,ptr2,ptr3);
printf("check3\n");
fclose(file1); fclose(file1);
fclose(file2); fclose(file2);
......
...@@ -18,6 +18,7 @@ void test_is_not_prime(void){ ...@@ -18,6 +18,7 @@ void test_is_not_prime(void){
CU_ASSERT_FALSE(is_prime(14)); CU_ASSERT_FALSE(is_prime(14));
} }
void empty_file_test(void){ void empty_file_test(void){
printf("check1\n");
FILE *file1 = NULL; FILE *file1 = NULL;
int err = run("Test_files/empty_input.txt","actual_output.txt",4); int err = run("Test_files/empty_input.txt","actual_output.txt",4);
...@@ -36,7 +37,7 @@ void empty_file_test(void){ ...@@ -36,7 +37,7 @@ void empty_file_test(void){
CU_ASSERT_EQUAL(fgets(chaine1,20,file1),NULL); CU_ASSERT_EQUAL(fgets(chaine1,20,file1),NULL);
fclose(file1); fclose(file1);
printf("check2\n");
} }
void short_file_test(void){ void short_file_test(void){
...@@ -171,7 +172,7 @@ int main(int argc, char *argv[]){ ...@@ -171,7 +172,7 @@ int main(int argc, char *argv[]){
return CU_get_error(); return CU_get_error();
} }
printf("check1\n");
CU_basic_run_tests(); CU_basic_run_tests();
//CU_automated_run_tests(); //CU_automated_run_tests();
CU_basic_show_failures(CU_get_failure_list()); CU_basic_show_failures(CU_get_failure_list());
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter