Projet

Général

Profil

« Précédent | Suivant » 

Révision 186

Ajouté par Abdou FAYE il y a environ 3 ans

implantation de la fonction decode_int

Voir les différences:

branch/faye/sp4a12/main.c
i++;
}
return res;
}
int decode_int(char c){
if (c<'0' || c>'9'){
return -1;
}
return -1;
}
//Fonction ? modifier !!!!!
void traitement(char * trame)
......
if (5!=5){
printf ("Erreur Test unitaire basique.\n");
exit(-1);
}
}
if (trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
}
if (trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
......
printf ("Erreur Test unitaire trame_cmp.\n");
exit(-1);
}
if (decode_int('0')!=0){
printf ("Erreur Test unitaire decode_int.\n");
exit(-1);
}
if (decode_int('7')!=7){
printf ("Erreur Test unitaire decode_int.\n");
exit(-1);
}
if (decode_int('A')!=-1){
printf ("Erreur Test unitaire decode_int.\n");
exit(-1);
}
}

Formats disponibles : Unified diff