-
Notifications
You must be signed in to change notification settings - Fork 0
/
game_test_aux.c
53 lines (44 loc) · 1.29 KB
/
game_test_aux.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @file game_test_aux.c
* @brief Game Tests Aux.
* @copyright University of Bordeaux. All rights reserved, 2021.
*
**/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "game.h"
#include "game_aux.h"
#include "game_examples.h"
#include "game_ext.h"
#include "game_test.h"
/* ************************************************************************** */
/* AUX TESTS */
/* ************************************************************************** */
int test_print(void)
{
game g = game_default();
game_print(g); // just print it...
game_delete(g);
return EXIT_SUCCESS;
}
/* ************************************************************************** */
int test_default(void)
{
game g0 = game_default();
bool test0 = check_game(g0, default_squares);
game_delete(g0);
if (test0) return EXIT_SUCCESS;
return EXIT_FAILURE;
}
/* ************************************************************************** */
int test_default_solution(void)
{
game g = game_default_solution();
bool test0 = check_game(g, solution_squares);
game_delete(g);
if (test0) return EXIT_SUCCESS;
return EXIT_FAILURE;
}
/* ************************************************************************** */