|
KiCad PCB EDA Suite
|
#include <cmath>#include <iomanip>#include <qa_utils/wx_utils/unit_test_utils.h>#include <geometry/eda_angle.h>Go to the source code of this file.
Classes | |
| struct | EDA_ANGLE_NORMALISE_CASE |
Functions | |
| BOOST_AUTO_TEST_CASE (Normalize) | |
| BOOST_AUTO_TEST_CASE (NormalizeHugeAndNonFinite) | |
| static double | refStep (double aValue, double aLow, bool aLowIncl, double aHigh, bool aHighIncl, double aPeriod) |
| Reference copy of the stepping loops that normalization used before exact folding. | |
| static bool | refIsCardinal (double aValue) |
| static bool | refIsCardinal90 (double aValue) |
| BOOST_AUTO_TEST_CASE (NormalizeMatchesSteppingLoops) | |
| BOOST_AUTO_TEST_CASE (ConstantAngles) | |
| BOOST_AUTO_TEST_CASE (Snapped) | |
| BOOST_AUTO_TEST_CASE (Orientation) | |
Variables | |
| static const std::vector< EDA_ANGLE_NORMALISE_CASE > | normalize_cases |
| BOOST_AUTO_TEST_CASE | ( | ConstantAngles | ) |
Definition at line 216 of file test_eda_angle.cpp.
References ANGLE_0, ANGLE_135, ANGLE_180, ANGLE_270, ANGLE_360, ANGLE_45, ANGLE_90, ANGLE_HORIZONTAL, ANGLE_VERTICAL, BOOST_CHECK_EQUAL(), and FULL_CIRCLE.
| BOOST_AUTO_TEST_CASE | ( | Normalize | ) |
Definition at line 66 of file test_eda_angle.cpp.
References EDA_ANGLE::AsDegrees(), BOOST_CHECK_EQUAL(), DEGREES_T, EDA_ANGLE::Normalize180(), EDA_ANGLE::Normalize720(), EDA_ANGLE::Normalize90(), normalize_cases, normalized(), and EDA_ANGLE::NormalizeNegative().
| BOOST_AUTO_TEST_CASE | ( | NormalizeHugeAndNonFinite | ) |
Definition at line 96 of file test_eda_angle.cpp.
References EDA_ANGLE::AsDegrees(), BOOST_CHECK_EQUAL(), DEGREES_T, EDA_ANGLE::Normalize(), EDA_ANGLE::Normalize180(), EDA_ANGLE::Normalize720(), EDA_ANGLE::Normalize90(), and EDA_ANGLE::NormalizeNegative().
| BOOST_AUTO_TEST_CASE | ( | NormalizeMatchesSteppingLoops | ) |
Definition at line 175 of file test_eda_angle.cpp.
References BOOST_CHECK_EQUAL(), DEGREES_T, refIsCardinal(), refIsCardinal90(), and refStep().
| BOOST_AUTO_TEST_CASE | ( | Orientation | ) |
Definition at line 258 of file test_eda_angle.cpp.
References ANGLE_180, EDA_ANGLE::AsDegrees(), BOOST_CHECK_EQUAL(), and DEGREES_T.
| BOOST_AUTO_TEST_CASE | ( | Snapped | ) |
Definition at line 232 of file test_eda_angle.cpp.
References ANGLE_0, ANGLE_45, ANGLE_90, BOOST_CHECK_EQUAL(), DEGREES_T, and EDA_ANGLE::Snapped().
|
static |
Definition at line 152 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 164 of file test_eda_angle.cpp.
References std::abs().
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Reference copy of the stepping loops that normalization used before exact folding.
They are exact at the magnitudes sampled here, so the folded versions must match them bit for bit, signed zero included.
Definition at line 140 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 44 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().