-
Notifications
You must be signed in to change notification settings - Fork 0
/
game_test.h
76 lines (63 loc) · 2.49 KB
/
game_test.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* @file game_test.h
* @brief All Test Functions.
* @copyright University of Bordeaux. All rights reserved, 2021.
**/
#ifndef __GAME_TEST_H__
#define __GAME_TEST_H__
#include "game.h"
#include "game_ext.h"
#include "game_tools.h"
/* ************************************************************************** */
/* CHECK ROUTINES */
/* ************************************************************************** */
bool check_game_ext(cgame g, uint nb_rows, uint nb_cols, square* squares, bool wrapping);
bool check_game(game g, square* squares);
/* ************************************************************************** */
/* AUX TESTS */
/* ************************************************************************** */
int test_print(void);
int test_default(void);
int test_default_solution(void);
/* ************************************************************************** */
/* BASIC TESTS (V1) */
/* ************************************************************************** */
int test_new(void);
int test_new_empty(void);
int test_copy(void);
int test_equal(void);
int test_delete(void);
int test_set_square(void);
int test_get_square(void);
int test_get_state(void);
int test_get_flags(void);
int test_is_state(void);
int test_has_flag(void);
int test_play_move(void);
int test_check_move(void);
int test_is_over(void);
int test_restart(void);
int test_update_flags(void);
/* ************************************************************************** */
/* EXT TESTS (V2) */
/* ************************************************************************** */
int test_new_ext(void);
int test_new_empty_ext(void);
int test_equal_ext(void);
int test_copy_ext(void);
int test_game_1d(void);
int test_game_wrapping_2x2(void);
int test_game_wrapping_3x3(void);
int test_game_wrapping_5x3(void);
int test_game_wrapping_error(void);
int test_game_diag(void);
int test_undo_one(void);
int test_undo_redo_some(void);
int test_undo_redo_all(void);
int test_restart_undo(void);
/* ************************************************************************** */
/* GAME_TOOLS TEST (GAME_TOOLS) */
/* ************************************************************************** */
int test_load(void);
int test_save(void);
#endif // __GAME_TEST_H__