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

Go to the source code of this file.

Classes

struct  TEST_CALC_ARC_CENTER_CASE
 

Functions

static bool Ref0CircleCenterFrom3Points (const VECTOR2D &p1, const VECTOR2D &p2, const VECTOR2D &p3, VECTOR2D *aCenter)
 Test suite for KiCad math code.
 
static const VECTOR2D Ref1CalcArcCenter (const VECTOR2D &aStart, const VECTOR2D &aMid, const VECTOR2D &aEnd)
 
 BOOST_AUTO_TEST_CASE (TestCalcArcCenter3Pts)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (TestInterceptsPositiveX)
 
 BOOST_AUTO_TEST_CASE (TestInterceptsNegativeX)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( TestCalcArcCenter3Pts  )

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( TestInterceptsNegativeX  )

Definition at line 308 of file test_kimath.cpp.

References BOOST_CHECK(), and InterceptsNegativeX().

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( TestInterceptsPositiveX  )

Definition at line 297 of file test_kimath.cpp.

References BOOST_CHECK(), and InterceptsPositiveX().

◆ Ref0CircleCenterFrom3Points()

static bool Ref0CircleCenterFrom3Points ( const VECTOR2D p1,
const VECTOR2D p2,
const VECTOR2D p3,
VECTOR2D aCenter 
)
static

Test suite for KiCad math code.

Definition at line 58 of file test_kimath.cpp.

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE().

◆ Ref1CalcArcCenter()

static const VECTOR2D Ref1CalcArcCenter ( const VECTOR2D aStart,
const VECTOR2D aMid,
const VECTOR2D aEnd 
)
static

Definition at line 82 of file test_kimath.cpp.

References std::abs(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE().