KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_arc_chord_params.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#include <geometry/arc_chord_params.h>
#include <cmath>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (DegenerateCases)
 Test that degenerate cases (collinear points) return invalid.
 
 BOOST_AUTO_TEST_CASE (QuarterCircle)
 Test a simple 90-degree arc (quarter circle).
 
 BOOST_AUTO_TEST_CASE (Semicircle)
 Test a semicircle (180-degree arc).
 
 BOOST_AUTO_TEST_CASE (ShallowArc)
 Test a shallow arc (large radius, small arc angle).
 
 BOOST_AUTO_TEST_CASE (StartEndAngles)
 Test that start and end angles are correct.
 
 BOOST_AUTO_TEST_CASE (OffsetCenter)
 Test arc with center not at origin.
 
 BOOST_AUTO_TEST_CASE (ArcDirection)
 Test clockwise vs counter-clockwise arcs.
 
 BOOST_AUTO_TEST_CASE (ChordMidpoint)
 Test that GetChordMidpoint returns correct values.
 
 BOOST_AUTO_TEST_CASE (UnitVectorsNormalized)
 Test unit vectors are normalized.
 
 BOOST_AUTO_TEST_CASE (MajorArc)
 Test a major arc (greater than 180 degrees).
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/10]

◆ BOOST_AUTO_TEST_CASE() [2/10]

BOOST_AUTO_TEST_CASE ( ChordMidpoint )

Test that GetChordMidpoint returns correct values.

Definition at line 268 of file test_arc_chord_params.cpp.

References BOOST_REQUIRE(), ARC_CHORD_PARAMS::Compute(), end, ARC_CHORD_PARAMS::GetChordMidpoint(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BOOST_AUTO_TEST_CASE() [3/10]

BOOST_AUTO_TEST_CASE ( DegenerateCases )

Test that degenerate cases (collinear points) return invalid.

Definition at line 33 of file test_arc_chord_params.cpp.

References BOOST_AUTO_TEST_CASE(), ARC_CHORD_PARAMS::Compute(), and ARC_CHORD_PARAMS::IsValid().

◆ BOOST_AUTO_TEST_CASE() [4/10]

BOOST_AUTO_TEST_CASE ( MajorArc )

◆ BOOST_AUTO_TEST_CASE() [5/10]

BOOST_AUTO_TEST_CASE ( OffsetCenter )

◆ BOOST_AUTO_TEST_CASE() [6/10]

◆ BOOST_AUTO_TEST_CASE() [7/10]

◆ BOOST_AUTO_TEST_CASE() [8/10]

BOOST_AUTO_TEST_CASE ( ShallowArc )

◆ BOOST_AUTO_TEST_CASE() [9/10]

BOOST_AUTO_TEST_CASE ( StartEndAngles )

◆ BOOST_AUTO_TEST_CASE() [10/10]

BOOST_AUTO_TEST_CASE ( UnitVectorsNormalized )