INF2004-Project v0.1
 
Loading...
Searching...
No Matches
pathfinding_tests.c File Reference

This file contains the tests for the A* pathfinding algorithm. More...

#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include "pathfinding/a_star.h"
#include "pathfinding/maze.h"
Include dependency graph for pathfinding_tests.c:

Enumerations

enum  constants_t {
  GRID_ROWS = 6 , GRID_COLS = 4 , TEST_BUFFER_SIZE = 2048u , INITIALISE_WAIT = 5000u ,
  GRID_ROWS = 5 , GRID_COLS = 5 , GRID_ROWS = 5 , GRID_COLS = 5 ,
  GRID_ROWS = 10 , GRID_COLS = 10
}
 Constants used in the tests. More...
 

Functions

int pathfinding_tests (int argc, char *argv[])
 The main function for the pathfinding tests. More...
 

Detailed Description

This file contains the tests for the A* pathfinding algorithm.

Author
Christopher Kok (chris.nosp@m.@for.nosp@m.celig.nosp@m.htni.nosp@m.ng.xy.nosp@m.z)
Version
0.1
Date
2023-11-19

Enumeration Type Documentation

◆ constants_t

Constants used in the tests.

Enumerator
GRID_ROWS 

Number of rows in the grid.

GRID_COLS 

Number of columns in the grid.

TEST_BUFFER_SIZE 

Size of the test buffer for serialisation.

INITIALISE_WAIT 

Time to wait for the user to open the serial terminal.

GRID_ROWS 

Number of rows in the grid.

GRID_COLS 

Number of columns in the grid.

GRID_ROWS 

Number of rows in the grid.

GRID_COLS 

Number of columns in the grid.

GRID_ROWS 

Number of rows in the grid.

GRID_COLS 

Number of columns in the grid.

Function Documentation

◆ pathfinding_tests()

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

The main function for the pathfinding tests.

Parameters
[in]argcNumber of arguments.
[in]argvVector of arguments.
Returns
int 0 if the test passes, -1 otherwise.