KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_shape_poly_set_distance.cpp File Reference

Go to the source code of this file.

Classes

struct  SPS_DISTANCE_TO_SEG_CASE
 Declares the Boost test suite fixture. More...
 

Functions

static constexpr int Millimeter2iu (double mm)
 
static std::vector< SPS_DISTANCE_TO_SEG_CASEGetSPSSegDistCases ()
 
 BOOST_AUTO_TEST_CASE (SegDistance)
 Check segment distances. More...
 

Variables

static constexpr double IU_PER_MM = 1e3
 Mock up a conversion function. More...
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( SegDistance  )

Check segment distances.

Definition at line 142 of file test_shape_poly_set_distance.cpp.

References BOOST_TEST_CONTEXT, GetSPSSegDistCases(), and SHAPE_POLY_SET::SquaredDistanceToSeg().

◆ GetSPSSegDistCases()

static std::vector< SPS_DISTANCE_TO_SEG_CASE > GetSPSSegDistCases ( )
static

Definition at line 63 of file test_shape_poly_set_distance.cpp.

References Millimeter2iu().

Referenced by BOOST_AUTO_TEST_CASE().

◆ Millimeter2iu()

static constexpr int Millimeter2iu ( double  mm)
inlinestaticconstexpr

Definition at line 37 of file test_shape_poly_set_distance.cpp.

References IU_PER_MM.

Referenced by GetSPSSegDistCases().

Variable Documentation

◆ IU_PER_MM

constexpr double IU_PER_MM = 1e3
staticconstexpr

Mock up a conversion function.

Definition at line 35 of file test_shape_poly_set_distance.cpp.

Referenced by Millimeter2iu().