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

test

parent f077eb31
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #5716 réussi
...@@ -18,7 +18,7 @@ void test_is_not_prime(void){ ...@@ -18,7 +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);
...@@ -37,7 +37,7 @@ void empty_file_test(void){ ...@@ -37,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){
...@@ -49,14 +49,14 @@ void short_file_test(void){ ...@@ -49,14 +49,14 @@ void short_file_test(void){
CU_FAIL("short_expected_output opening fail"); CU_FAIL("short_expected_output opening fail");
return; return;
} }
printf("check1\n");
int err = run("Test_files/short_input.txt","actual_output.txt",4); int err = run("Test_files/short_input.txt","actual_output.txt",4);
if (err == -1){ if (err == -1){
CU_FAIL("method run failed"); CU_FAIL("method run failed");
fclose(file1); fclose(file1);
return; return;
} }
printf("check2\n");
file2 = fopen("actual_output.txt","r"); file2 = fopen("actual_output.txt","r");
if (file2 == NULL){ if (file2 == NULL){
CU_FAIL("actual_output opening fail"); CU_FAIL("actual_output opening fail");
......
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