Skip to content
Snippets Groups Projects
partie_test.c 549 B
Newer Older
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include "partie.h"

/*#include "partie_test.h"*/

void test_getNbTour(void **state) {
    Partie p;
	p.nbTours = 4;

    // Test 1
	assert_int_equal(p.nbTours, getNbTour(&p));

	// Test 2
	assert_int_equal(-1, getNbTour(NULL));
}

void test_getListJoueur(void **state){
    Partie p;
	p.participants = 1;

    // Test 1
	assert_int_equal(p.participants, getListJoueur(&p));
	// Test 2
	assert_int_equal(-1, getNbTour(NULL));
}