|
KiCad PCB EDA Suite
|
Test suite for PADS_UNIT_CONVERTER. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <io/pads/pads_unit_converter.h>#include <ostream>Go to the source code of this file.
Classes | |
| struct | PADS_UNIT_CONVERTER_FIXTURE |
Functions | |
| std::ostream & | operator<< (std::ostream &os, PADS_UNIT_TYPE aType) |
| BOOST_AUTO_TEST_CASE (DefaultsToMils) | |
| BOOST_AUTO_TEST_CASE (MilsConversion) | |
| BOOST_AUTO_TEST_CASE (MetricConversion) | |
| BOOST_AUTO_TEST_CASE (InchesConversion) | |
| BOOST_AUTO_TEST_CASE (UnitTypeGetter) | |
| BOOST_AUTO_TEST_CASE (ZeroConversion) | |
| BOOST_AUTO_TEST_CASE (NegativeConversion) | |
| BOOST_AUTO_TEST_CASE (ConstantsAreCorrect) | |
| BOOST_AUTO_TEST_CASE (BasicUnitsMode) | |
| BOOST_AUTO_TEST_CASE (BasicUnitsCustomScale) | |
| BOOST_AUTO_TEST_CASE (ParseFileHeaderBasic) | |
| BOOST_AUTO_TEST_CASE (ParseFileHeaderMils) | |
| BOOST_AUTO_TEST_CASE (ParseFileHeaderMetric) | |
| BOOST_AUTO_TEST_CASE (ParseFileHeaderInches) | |
| BOOST_AUTO_TEST_CASE (ParseFileHeaderUnknown) | |
| BOOST_AUTO_TEST_CASE (BasicModeOverridesBaseUnits) | |
| BOOST_AUTO_TEST_CASE (ParseUnitCodeMils) | |
| BOOST_AUTO_TEST_CASE (ParseUnitCodeMetric) | |
| BOOST_AUTO_TEST_CASE (ParseUnitCodeInches) | |
| BOOST_AUTO_TEST_CASE (ParseUnitCodeNoOverride) | |
| BOOST_AUTO_TEST_CASE (PushPopUnitOverride) | |
| BOOST_AUTO_TEST_CASE (PushInvalidUnitCode) | |
| BOOST_AUTO_TEST_CASE (PopEmptyStack) | |
| BOOST_AUTO_TEST_CASE (OverrideDoesNotAffectBasicMode) | |
Test suite for PADS_UNIT_CONVERTER.
Definition in file test_pads_unit_converter.cpp.
| BOOST_AUTO_TEST_CASE | ( | BasicModeOverridesBaseUnits | ) |
Definition at line 286 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), METRIC, PADS_UNIT_CONVERTER::SetBaseUnits(), PADS_UNIT_CONVERTER::SetBasicUnitsMode(), and PADS_UNIT_CONVERTER::ToNanometers().
| BOOST_AUTO_TEST_CASE | ( | BasicUnitsCustomScale | ) |
| BOOST_AUTO_TEST_CASE | ( | BasicUnitsMode | ) |
Definition at line 183 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::IsBasicUnitsMode(), PADS_UNIT_CONVERTER::SetBasicUnitsMode(), and PADS_UNIT_CONVERTER::ToNanometers().
| BOOST_AUTO_TEST_CASE | ( | ConstantsAreCorrect | ) |
Definition at line 160 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::BASIC_TO_NM, BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::INCHES_TO_NM, PADS_UNIT_CONVERTER::MILS_TO_NM, and PADS_UNIT_CONVERTER::MM_TO_NM.
| BOOST_AUTO_TEST_CASE | ( | DefaultsToMils | ) |
Definition at line 55 of file test_pads_unit_converter.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetUnitType(), and MILS.
| BOOST_AUTO_TEST_CASE | ( | InchesConversion | ) |
Definition at line 100 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), INCHES, PADS_UNIT_CONVERTER::SetBaseUnits(), PADS_UNIT_CONVERTER::ToNanometers(), and PADS_UNIT_CONVERTER::ToNanometersSize().
| BOOST_AUTO_TEST_CASE | ( | MetricConversion | ) |
Definition at line 81 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), METRIC, PADS_UNIT_CONVERTER::SetBaseUnits(), PADS_UNIT_CONVERTER::ToNanometers(), and PADS_UNIT_CONVERTER::ToNanometersSize().
| BOOST_AUTO_TEST_CASE | ( | MilsConversion | ) |
Definition at line 62 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), MILS, PADS_UNIT_CONVERTER::SetBaseUnits(), PADS_UNIT_CONVERTER::ToNanometers(), and PADS_UNIT_CONVERTER::ToNanometersSize().
| BOOST_AUTO_TEST_CASE | ( | NegativeConversion | ) |
Definition at line 149 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), MILS, PADS_UNIT_CONVERTER::SetBaseUnits(), PADS_UNIT_CONVERTER::ToNanometers(), and PADS_UNIT_CONVERTER::ToNanometersSize().
| BOOST_AUTO_TEST_CASE | ( | OverrideDoesNotAffectBasicMode | ) |
| BOOST_AUTO_TEST_CASE | ( | ParseFileHeaderBasic | ) |
Definition at line 227 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::IsBasicUnitsMode(), PADS_UNIT_CONVERTER::ParseFileHeader(), and PADS_UNIT_CONVERTER::SetBasicUnitsMode().
| BOOST_AUTO_TEST_CASE | ( | ParseFileHeaderInches | ) |
Definition at line 266 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetUnitType(), INCHES, PADS_UNIT_CONVERTER::IsBasicUnitsMode(), and PADS_UNIT_CONVERTER::ParseFileHeader().
| BOOST_AUTO_TEST_CASE | ( | ParseFileHeaderMetric | ) |
Definition at line 255 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetUnitType(), PADS_UNIT_CONVERTER::IsBasicUnitsMode(), METRIC, and PADS_UNIT_CONVERTER::ParseFileHeader().
| BOOST_AUTO_TEST_CASE | ( | ParseFileHeaderMils | ) |
Definition at line 244 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetUnitType(), PADS_UNIT_CONVERTER::IsBasicUnitsMode(), MILS, and PADS_UNIT_CONVERTER::ParseFileHeader().
| BOOST_AUTO_TEST_CASE | ( | ParseFileHeaderUnknown | ) |
Definition at line 277 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::ParseFileHeader().
| BOOST_AUTO_TEST_CASE | ( | ParseUnitCodeInches | ) |
Definition at line 347 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), INCHES, PADS_UNIT_CONVERTER::ParseUnitCode(), and result.
| BOOST_AUTO_TEST_CASE | ( | ParseUnitCodeMetric | ) |
Definition at line 328 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), METRIC, PADS_UNIT_CONVERTER::ParseUnitCode(), and result.
| BOOST_AUTO_TEST_CASE | ( | ParseUnitCodeMils | ) |
Definition at line 304 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), MILS, PADS_UNIT_CONVERTER::ParseUnitCode(), and result.
| BOOST_AUTO_TEST_CASE | ( | ParseUnitCodeNoOverride | ) |
Definition at line 366 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::ParseUnitCode(), and result.
| BOOST_AUTO_TEST_CASE | ( | PopEmptyStack | ) |
Definition at line 437 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::HasUnitOverride(), PADS_UNIT_CONVERTER::PopUnitOverride(), and PADS_UNIT_CONVERTER::ToNanometers().
| BOOST_AUTO_TEST_CASE | ( | PushInvalidUnitCode | ) |
Definition at line 419 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::HasUnitOverride(), and PADS_UNIT_CONVERTER::PushUnitOverride().
| BOOST_AUTO_TEST_CASE | ( | PushPopUnitOverride | ) |
Definition at line 385 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetOverrideDepth(), PADS_UNIT_CONVERTER::HasUnitOverride(), MILS, PADS_UNIT_CONVERTER::PopUnitOverride(), PADS_UNIT_CONVERTER::PushUnitOverride(), PADS_UNIT_CONVERTER::SetBaseUnits(), and PADS_UNIT_CONVERTER::ToNanometers().
| BOOST_AUTO_TEST_CASE | ( | UnitTypeGetter | ) |
Definition at line 119 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), PADS_UNIT_CONVERTER::GetUnitType(), INCHES, METRIC, MILS, and PADS_UNIT_CONVERTER::SetBaseUnits().
| BOOST_AUTO_TEST_CASE | ( | ZeroConversion | ) |
Definition at line 134 of file test_pads_unit_converter.cpp.
References BOOST_CHECK_EQUAL(), INCHES, METRIC, MILS, PADS_UNIT_CONVERTER::SetBaseUnits(), and PADS_UNIT_CONVERTER::ToNanometers().
| std::ostream & operator<< | ( | std::ostream & | os, |
| PADS_UNIT_TYPE | aType ) |
Definition at line 35 of file test_pads_unit_converter.cpp.