penguins  1.0.0
tests.c File Reference

Go to the source code of this file.

Functions

static MunitResult test_game_clone (const MunitParameter *params, void *data)
 
static void setup_test_game (Game *game, int players_count, int penguins_per_player, int board_width, int board_height, const char *board_data)
 
static MunitResult test_placeable_spot_exists (const MunitParameter *params, void *data)
 
static MunitResult test_placeable_spot_does_not_exist (const MunitParameter *params, void *data)
 
static MunitResult test_valid_movement_exists_for_player (const MunitParameter *params, void *data)
 
static MunitResult test_no_valid_movement_exists_for_player (const MunitParameter *params, void *data)
 
static MunitResult test_detect_valid_movement (const MunitParameter *params, void *data)
 
static MunitResult test_movement_over_empty_space_invalid (const MunitParameter *params, void *data)
 
static MunitResult test_movement_over_penguin_invalid (const MunitParameter *params, void *data)
 
static MunitResult test_move_penguin_and_calculate_points (const MunitParameter *params, void *data)
 
int main (int argc, char *argv[])
 

Variables

static MunitTest board_suite_tests []
 
static const MunitSuite board_suite
 

Function Documentation

◆ test_game_clone()

static MunitResult test_game_clone ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 12 of file tests.c.

◆ setup_test_game()

static void setup_test_game ( Game game,
int  players_count,
int  penguins_per_player,
int  board_width,
int  board_height,
const char *  board_data 
)
static

◆ test_placeable_spot_exists()

static MunitResult test_placeable_spot_exists ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 71 of file tests.c.

◆ test_placeable_spot_does_not_exist()

static MunitResult test_placeable_spot_does_not_exist ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 82 of file tests.c.

◆ test_valid_movement_exists_for_player()

static MunitResult test_valid_movement_exists_for_player ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 94 of file tests.c.

◆ test_no_valid_movement_exists_for_player()

static MunitResult test_no_valid_movement_exists_for_player ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 106 of file tests.c.

◆ test_detect_valid_movement()

static MunitResult test_detect_valid_movement ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 117 of file tests.c.

◆ test_movement_over_empty_space_invalid()

static MunitResult test_movement_over_empty_space_invalid ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 131 of file tests.c.

◆ test_movement_over_penguin_invalid()

static MunitResult test_movement_over_penguin_invalid ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 144 of file tests.c.

◆ test_move_penguin_and_calculate_points()

static MunitResult test_move_penguin_and_calculate_points ( const MunitParameter *  params,
void *  data 
)
static

Definition at line 158 of file tests.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 255 of file tests.c.

Variable Documentation

◆ board_suite_tests

MunitTest board_suite_tests[]
static

Definition at line 174 of file tests.c.

◆ board_suite

const MunitSuite board_suite
static
Initial value:
= {
.prefix = "/board",
.suites = NULL,
.iterations = 1,
.options = MUNIT_SUITE_OPTION_NONE,
}
static MunitTest board_suite_tests[]
Definition: tests.c:174

Definition at line 247 of file tests.c.

Referenced by main().