Révision 146
Ajouté par Massamba FALL il y a plus de 3 ans
| main.c | ||
|---|---|---|
|
//Fonction ? modifier !!!!!
|
||
|
void traitement(char * trame)//https://forge.uca.fr/svn/https-forge-uca-fr-svn-polytech-ge-sp4abc-2022/branch/fall_massamba
|
||
|
{
|
||
|
static int cpt=0;https://forge.uca.fr/svn/https-forge-uca-fr-svn-polytech-ge-sp4abc-2022/branch/fall_massamba
|
||
|
cpt++;
|
||
|
static int cpt=0;//https://forge.uca.fr/svn/https-forge-uca-fr-svn-polytech-ge-sp4abc-2022/branch/fall_massamba
|
||
|
cpt++;
|
||
|
if (trame_cmp( trame,"GPGGA"))
|
||
|
|
||
|
printf ("> %s\n",trame);
|
||
|
}
|
||
|
|
||
|
//Ajouter vos tests unitaires dans cette fonction.
|
||
|
void tests_unitaires(void){
|
||
|
if (5!=5){
|
||
|
printf ("Erreur Test unitaire basique.\n");
|
||
|
exit(-1);
|
||
|
}
|
||
|
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("$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);
|
||
|
}
|
||
|
/*if (trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
|
||
|
printf ("Erreur Test uhttps://forge.uca.fr/svn/https-forge-uca-fr-svn-polytech-ge-sp4abc-2022/branch/fall_massambanitaire trame_cmp.\n");
|
||
|
exit(-1);
|
||
Formats disponibles : Unified diff
question 5 validé