|
KiCad PCB EDA Suite
|
#include <boost/test/tools/context.hpp>#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) |
| static EDA_ANGLE | deg (double d) |
| static EDA_ORIENTATION | orientation (double d) |
| BOOST_AUTO_TEST_CASE (NormalizeMatchesSteppingLoops) | |
| BOOST_AUTO_TEST_CASE (ConstantAngles) | |
| BOOST_AUTO_TEST_CASE (Snapped) | |
| BOOST_AUTO_TEST_CASE (AngleReflect) | |
| BOOST_AUTO_TEST_CASE (Orientation) | |
| BOOST_AUTO_TEST_CASE (OrientationReflect) | |
Variables | |
| static const std::vector< EDA_ANGLE_NORMALISE_CASE > | normalize_cases |
| BOOST_AUTO_TEST_CASE | ( | AngleReflect | ) |
Definition at line 270 of file test_eda_angle.cpp.
References EDA_ANGLE::AsDegrees(), BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), deg(), EDA_ANGLE::Normalized(), and EDA_ANGLE::Reflect().
| BOOST_AUTO_TEST_CASE | ( | ConstantAngles | ) |
Definition at line 230 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 68 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 98 of file test_eda_angle.cpp.
References EDA_ANGLE::AsDegrees(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_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 189 of file test_eda_angle.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), DEGREES_T, refIsCardinal(), refIsCardinal90(), and refStep().
| BOOST_AUTO_TEST_CASE | ( | Orientation | ) |
Definition at line 323 of file test_eda_angle.cpp.
References ANGLE_180, EDA_ANGLE::AsDegrees(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), deg(), and orientation().
| BOOST_AUTO_TEST_CASE | ( | OrientationReflect | ) |
Definition at line 353 of file test_eda_angle.cpp.
References BOOST_CHECK_EQUAL(), deg(), and orientation().
| BOOST_AUTO_TEST_CASE | ( | Snapped | ) |
Definition at line 246 of file test_eda_angle.cpp.
References ANGLE_0, ANGLE_45, ANGLE_90, BOOST_CHECK_EQUAL(), deg(), and EDA_ANGLE::Snapped().
|
static |
Definition at line 177 of file test_eda_angle.cpp.
References DEGREES_T.
Referenced by arcBox(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), PCB_IO_EASYEDAPRO_PARSER::createPAD(), PCB_IO_EASYEDAPRO_V3_PARSER::createV3PAD(), DEG2RAD(), MapAnglesV6(), orientation(), EAGLE_BIN_PARSER::postprocRotation(), and PDF_PLOTTER::renderWord().
|
static |
Definition at line 183 of file test_eda_angle.cpp.
References deg().
Referenced by PCB_IO_IPC2581::addPackage(), ORCAD_CONVERTER::addSymbolPin(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ZONE_FILLER::buildThermalSpokes(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), SHAPE_LINE_CHAIN::convertToClipper2(), PCB_IO_EASYEDAPRO_PARSER::createPAD(), PADS_SCH::PADS_SCH_SYMBOL_BUILDER::createPin(), PCB_IO_EASYEDAPRO_V3_PARSER::createV3PAD(), KIGFX::PCB_PAINTER::drawDrillMarks(), BOARD::ExchangeFootprint(), PCB_IO_EASYEDA::FootprintLoad(), DSN::SPECCTRA_DB::FromSESSION(), SCH_SYMBOL::GetOrientationProp(), CADSTAR_SCH_ARCHIVE_LOADER::getSpinStyle(), SCH_IO_KICAD_LEGACY::loadPageSettings(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadPin(), SCH_IO_PADS::LoadSchematicFile(), SCH_IO_KICAD_LEGACY::loadSymbol(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), OrcadReadDrawnInstance(), OrcadReadGraphicInst(), OrcadReadPlacedInstance(), SCH_IO_ALTIUM::ParseComponent(), ALTIUM_PCB::ParseComponentsBodies6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseDIMENSION(), PADS_SCH::PADS_SCH_PARSER::parseSymbolDef(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), ORCAD_CONVERTER::placeBitmap(), FOOTPRINT::Rotate(), SCH_IO_KICAD_SEXPR::saveSymbol(), SCH_WRITER_V10::saveSymbol(), SCH_WRITER_V9::saveSymbol(), SCH_SYMBOL::SetMirrorX(), SCH_SYMBOL::SetMirrorY(), SetTextPositioning(), SCH_IO_GEDA::toKiCadOrientation(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), and DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow().
|
static |
Definition at line 154 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 166 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 142 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 46 of file test_eda_angle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().