|
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 282 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 179 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 156 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 51 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 96 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 77 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 58 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 145 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 223 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 262 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 251 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 240 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 273 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::ParseFileHeader().
| BOOST_AUTO_TEST_CASE | ( | ParseUnitCodeInches | ) |
Definition at line 343 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 324 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 300 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 362 of file test_pads_unit_converter.cpp.
References PADS_UNIT_CONVERTER::ParseUnitCode(), and result.
| BOOST_AUTO_TEST_CASE | ( | PopEmptyStack | ) |
Definition at line 433 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 415 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 381 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 115 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 130 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 31 of file test_pads_unit_converter.cpp.