Projet

Général

Profil

« Précédent | Suivant » 

Révision 263

Ajouté par Henri JOUANNY il y a environ 3 ans

implantation de la fonction decode_int avec quelques tests unitaire de fait

Voir les différences:

main.c
if (trame_cmp("$APRMC...", "GPGGA")==0){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}*/
}*/
if (decode_int("7")!=-1)
{
printf ("Erreur Test unitaire decode_int.\n");
exit(-1);
}
}
int trame_cmp(char *trame, char *type)
......
}
return b;
}
int decode_int(char *c)
{
int nb;
if (*c>=48 && *c<=57)
{
nb=*c-48;
}
else
{
nb=-1;
}
return nb;
}
// Ne pas modifier cette fonction
int main(int argc,char ** argv)

Formats disponibles : Unified diff