Functions
bounds_test.cpp File Reference
#include <gtest/gtest.h>
#include <nav_2d_utils/bounds.h>
#include <nav_grid/vector_nav_grid.h>
#include <vector>
Include dependency graph for bounds_test.cpp:

Go to the source code of this file.

Functions

void countValues (const nav_grid::VectorNavGrid< unsigned char > &grid, unsigned int &match, unsigned int &missed, unsigned int &multiple)
 Count the values in a grid. More...
 
int main (int argc, char **argv)
 
 TEST (DivideBounds, zeroes)
 
 TEST (DivideBounds, iterative_tests)
 
 TEST (DivideBounds, recursive_tests)
 

Function Documentation

void countValues ( const nav_grid::VectorNavGrid< unsigned char > &  grid,
unsigned int &  match,
unsigned int &  missed,
unsigned int &  multiple 
)

Count the values in a grid.

Parameters
[in]Thegrid
[out]matchNumber of values == 1
[out]missedNumber of values == 0
[out]multipleNumber of other values

Definition at line 49 of file bounds_test.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 195 of file bounds_test.cpp.

TEST ( DivideBounds  ,
zeroes   
)

Definition at line 79 of file bounds_test.cpp.

TEST ( DivideBounds  ,
iterative_tests   
)

This test is for the divideBounds method and takes grids of various sizes (cycled through with the outer two loops) and tries to divide them into subgrids of various sizes (cycled through with the next two loops). The resulting vector of bounds should cover every cell in the original grid, so each of the divided bounds is iterated over, adding one to each grid cell. If everything works perfectly, each cell should be touched exactly once.

Definition at line 101 of file bounds_test.cpp.

TEST ( DivideBounds  ,
recursive_tests   
)

This test is for the divideBounds method and calls it recursively to ensure that the method works when the minimum values in the original bounds are not zero.

Definition at line 151 of file bounds_test.cpp.



nav_2d_utils
Author(s):
autogenerated on Sun Jan 10 2021 04:08:32