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

code ok, validé par test.c

parent 9fd07842
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -116,10 +116,10 @@ int run (char *input,char *output){
struct node *current;
current = malloc(sizeof(node_t));
*current = *pr_divs->tail;
fprintf(file2,"%s ",chaine);
fprintf(file2,"%s",chaine);
for (int i = 0; i < pr_divs->size; i++)
{
fprintf(file2,"%d ",current->value);
fprintf(file2," %d",current->value);
current = current->next;
}
fputc('\n',file2);
......
......@@ -39,17 +39,15 @@ void file_test(void){
return;
}
CU_ASSERT_PTR_EQUAL(file1,file2);
/* char chaine1[50];
char chaine1[50];
char chaine2[50];
while (fgets(chaine1,50,file1) != NULL && fgets(chaine2,50,file2) != NULL)
{
printf(chaine1);
printf(chaine2);
CU_ASSERT_PTR_EQUAL(chaine1,chaine2);
} */
printf("%d\n",chaine1[2]);
printf("%d\n",chaine2[2]);
CU_ASSERT_STRING_EQUAL(chaine1,chaine2);
}
fclose(file1);
fclose(file2);
......
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