Projet

Général

Profil

« Précédent | Suivant » 

Révision 21

Ajouté par Stephen LOPEZ il y a environ 3 ans

question 4 validée, début de la question 5

Voir les différences:

branch/LOPEZ_Stephen/tp_sp4_2022_LOPEZ_Stephen/sp4a12/main.c
printf ("Erreur Test unitaire basique.\n");
exit(-1);
}
/*if (trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
if (trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}*/
}
}
if (trame_cmp("$GPRMC suite chaine","GPGGA")!=0){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (trame_cmp("$GPRMC... ", "GPRMC" )!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (trame_cmp("$APRMC...", "GPGGA")!=0){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
}
int trame_cmp(char *trame,char*type)
{
int i;
int res=1;
for (i=0;i<5;i++)
{
if(trame[i+1]!=type[i])
{
res=0;
}
}
return res;
}
// Ne pas modifier cette fonction
int main(int argc,char ** argv)

Formats disponibles : Unified diff