You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.3 KiB
63 lines
1.3 KiB
/**
|
|
* @file main.c
|
|
*
|
|
* @brief Fichier principal contenant les tests pour l'Arbre Binaire de Recherche (ABR).
|
|
*/
|
|
|
|
#include "abr.h"
|
|
|
|
/**
|
|
* @brief Fonction de test pour les opérations sur l'ABR.
|
|
*/
|
|
void testAbr(void){
|
|
Abr a1 = creerArbrevide();
|
|
Abr a2 = creerArbrevide();
|
|
|
|
// // Teste si l'arbre a1 est vide
|
|
// estArbreVide(a1);
|
|
|
|
// // Insère des valeurs dans l'arbre a2
|
|
// insererEnFeuille(&a2, 10);
|
|
// insererEnFeuille(&a2, 10);
|
|
// insererEnFeuille(&a2, 11);
|
|
// insererEnFeuille(&a2, 9);
|
|
|
|
// // Teste si l'arbre a2 est vide
|
|
// estArbreVide(a2);
|
|
|
|
// // Vide l'arbre a1
|
|
// viderArbre(&a1);
|
|
|
|
// // Affiche l'arbre a1 en ordre croissant
|
|
// afficherCroissant(a1);
|
|
|
|
// // Affiche l'arbre a2 en ordre croissant
|
|
// afficherCroissant(a2);
|
|
|
|
// // Affiche l'arbre a2 en ordre décroissant
|
|
// afficherDecroissant(a2);
|
|
|
|
// // Vide l'arbre a2
|
|
// viderArbre(&a2);
|
|
|
|
// // Affiche à nouveau l'arbre a2 en ordre croissant
|
|
// afficherCroissant(a2);
|
|
|
|
// // Affiche à nouveau l'arbre a2 en ordre décroissant
|
|
// afficherDecroissant(a2);
|
|
|
|
// // Teste si l'arbre a2 est vide
|
|
// estArbreVide(a2);
|
|
}
|
|
|
|
/**
|
|
* @brief Fonction principale du programme.
|
|
*
|
|
* @return 0 en cas de succès.
|
|
*/
|
|
int main(void){
|
|
// testAbr();
|
|
printf("Hello");
|
|
return 0;
|
|
}
|