#include "file.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>






int main(){
	file_t* f = file_vide();
	assert(est_file_vide(f));

	enfiler(f, 1);
	assert(!est_file_vide(f));
	enfiler(f, 2);
	enfiler(f, 3);
	assert(defiler(f) == 1);
	assert(defiler(f) == 2);
	enfiler(f, 4);
	assert(defiler(f) == 3);
	assert(defiler(f) == 4);
	assert(est_file_vide(f));

	// test de taille pour l'implémentation par tableau cyclique
	enfiler(f, 0);
	for (int i = 1; i <= 1000; ++i){
		assert(defiler(f) == i-1);
		enfiler(f, i);
	}

	free_file(f);
	return 0;
}