From 0acdabd1eb1a2d5ab9b6aa9f71df31c8cf088de8 Mon Sep 17 00:00:00 2001 From: jean-pierre charras <jp.charras@wanadoo.fr> Date: Sun, 2 Mar 2025 12:52:05 +0100 Subject: [PATCH] Fix other places where "IN" is used instead of INCH (mainly QA tests) --- pcbnew/pcb_io/altium/altium_parser_pcb.cpp | 2 +- pcbnew/pcb_io/altium/altium_parser_pcb.h | 2 +- pcbnew/pcb_io/altium/altium_pcb.cpp | 4 ++-- qa/tests/pcbnew/drc/test_custom_rule_severities.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_component_classes.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_copper_conn.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_copper_graphics.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_copper_sliver.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_incorrect_text_mirror.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_multi_netclasses.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_regressions.cpp | 4 ++-- qa/tests/pcbnew/drc/test_drc_skew.cpp | 2 +- qa/tests/pcbnew/drc/test_drc_starved_thermal.cpp | 2 +- qa/tests/pcbnew/drc/test_solder_mask_bridging.cpp | 2 +- qa/tests/pcbnew/test_tracks_cleaner.cpp | 4 ++-- qa/tests/pcbnew/test_zone_filler.cpp | 4 ++-- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pcbnew/pcb_io/altium/altium_parser_pcb.cpp b/pcbnew/pcb_io/altium/altium_parser_pcb.cpp index 010db13f30..35ed585c61 100644 --- a/pcbnew/pcb_io/altium/altium_parser_pcb.cpp +++ b/pcbnew/pcb_io/altium/altium_parser_pcb.cpp @@ -444,7 +444,7 @@ ADIMENSION6::ADIMENSION6( ALTIUM_BINARY_PARSER& aReader ) wxString dimensionunit = ALTIUM_PROPS_UTILS::ReadString( props, wxT( "TEXTDIMENSIONUNIT" ), wxT( "Millimeters" ) ); - if( dimensionunit == wxT( "Inches" ) ) textunit = ALTIUM_UNIT::IN; + if( dimensionunit == wxT( "Inches" ) ) textunit = ALTIUM_UNIT::INCH; else if( dimensionunit == wxT( "Mils" ) ) textunit = ALTIUM_UNIT::MILS; else if( dimensionunit == wxT( "Millimeters" ) ) textunit = ALTIUM_UNIT::MM; else if( dimensionunit == wxT( "Centimeters" ) ) textunit = ALTIUM_UNIT::CM; diff --git a/pcbnew/pcb_io/altium/altium_parser_pcb.h b/pcbnew/pcb_io/altium/altium_parser_pcb.h index 74123225c5..b5cc36cbda 100644 --- a/pcbnew/pcb_io/altium/altium_parser_pcb.h +++ b/pcbnew/pcb_io/altium/altium_parser_pcb.h @@ -50,7 +50,7 @@ enum class ALTIUM_UNIT { UNKNOWN = 0, - IN = 1, + INCH = 1, MILS = 2, MM = 3, CM = 4 diff --git a/pcbnew/pcb_io/altium/altium_pcb.cpp b/pcbnew/pcb_io/altium/altium_pcb.cpp index c90a9f0c9a..13e4722390 100644 --- a/pcbnew/pcb_io/altium/altium_pcb.cpp +++ b/pcbnew/pcb_io/altium/altium_pcb.cpp @@ -1646,7 +1646,7 @@ void ALTIUM_PCB::HelperParseDimensions6Linear( const ADIMENSION6& aElem ) switch( aElem.textunit ) { - case ALTIUM_UNIT::IN: dimension->SetUnits( EDA_UNITS::INCH ); break; + case ALTIUM_UNIT::INCH: dimension->SetUnits( EDA_UNITS::INCH ); break; case ALTIUM_UNIT::MILS: dimension->SetUnits( EDA_UNITS::MILS ); break; case ALTIUM_UNIT::MM: dimension->SetUnits( EDA_UNITS::MM ); break; case ALTIUM_UNIT::CM: dimension->SetUnits( EDA_UNITS::MM ); break; @@ -1697,7 +1697,7 @@ void ALTIUM_PCB::HelperParseDimensions6Radial(const ADIMENSION6 &aElem) switch( aElem.textunit ) { - case ALTIUM_UNIT::IN: dimension->SetUnits( EDA_UNITS::INCH ); break; + case ALTIUM_UNIT::INCH: dimension->SetUnits( EDA_UNITS::INCH ); break; case ALTIUM_UNIT::MILS: dimension->SetUnits( EDA_UNITS::MILS ); break; case ALTIUM_UNIT::MM: dimension->SetUnits( EDA_UNITS::MM ); break; case ALTIUM_UNIT::CM: dimension->SetUnits( EDA_UNITS::MM ); break; diff --git a/qa/tests/pcbnew/drc/test_custom_rule_severities.cpp b/qa/tests/pcbnew/drc/test_custom_rule_severities.cpp index 8db3cb335f..792e6fc2ff 100644 --- a/qa/tests/pcbnew/drc/test_custom_rule_severities.cpp +++ b/qa/tests/pcbnew/drc/test_custom_rule_severities.cpp @@ -83,7 +83,7 @@ BOOST_FIXTURE_TEST_CASE( DRCCustomRuleSeverityTest, DRC_REGRESSION_TEST_FIXTURE { BOOST_CHECK_EQUAL( violations.size(), 8 ); - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_component_classes.cpp b/qa/tests/pcbnew/drc/test_drc_component_classes.cpp index aa7ee396c6..8d4be18896 100644 --- a/qa/tests/pcbnew/drc/test_drc_component_classes.cpp +++ b/qa/tests/pcbnew/drc/test_drc_component_classes.cpp @@ -90,7 +90,7 @@ BOOST_FIXTURE_TEST_CASE( DRCComponentClasses, DRC_REGRESSION_TEST_FIXTURE ) } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_copper_conn.cpp b/qa/tests/pcbnew/drc/test_drc_copper_conn.cpp index 5b7f1bf5b0..73832986d8 100644 --- a/qa/tests/pcbnew/drc/test_drc_copper_conn.cpp +++ b/qa/tests/pcbnew/drc/test_drc_copper_conn.cpp @@ -96,7 +96,7 @@ BOOST_FIXTURE_TEST_CASE( DRCCopperConn, DRC_REGRESSION_TEST_FIXTURE ) } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_copper_graphics.cpp b/qa/tests/pcbnew/drc/test_drc_copper_graphics.cpp index 574b2ca181..bd4f286fb5 100644 --- a/qa/tests/pcbnew/drc/test_drc_copper_graphics.cpp +++ b/qa/tests/pcbnew/drc/test_drc_copper_graphics.cpp @@ -88,7 +88,7 @@ BOOST_FIXTURE_TEST_CASE( DRCCopperGraphicsTest, DRC_COPPER_GRAPHICS_TEST_FIXTURE { BOOST_CHECK_EQUAL( violations.size(), expected_err_cnt ); - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_copper_sliver.cpp b/qa/tests/pcbnew/drc/test_drc_copper_sliver.cpp index bafaa7babb..e19e8cafe4 100644 --- a/qa/tests/pcbnew/drc/test_drc_copper_sliver.cpp +++ b/qa/tests/pcbnew/drc/test_drc_copper_sliver.cpp @@ -94,7 +94,7 @@ BOOST_DATA_TEST_CASE_F( DRC_REGRESSION_TEST_FIXTURE, DRCCopperSliver, } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_incorrect_text_mirror.cpp b/qa/tests/pcbnew/drc/test_drc_incorrect_text_mirror.cpp index e64cd8bb16..5615720381 100644 --- a/qa/tests/pcbnew/drc/test_drc_incorrect_text_mirror.cpp +++ b/qa/tests/pcbnew/drc/test_drc_incorrect_text_mirror.cpp @@ -78,7 +78,7 @@ BOOST_FIXTURE_TEST_CASE( DRCIncorrectTextMirror, DRC_INCORRECT_TEXT_MIRROR_TEST_ } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_multi_netclasses.cpp b/qa/tests/pcbnew/drc/test_drc_multi_netclasses.cpp index 6d5c22a316..0b5ec4f949 100644 --- a/qa/tests/pcbnew/drc/test_drc_multi_netclasses.cpp +++ b/qa/tests/pcbnew/drc/test_drc_multi_netclasses.cpp @@ -93,7 +93,7 @@ BOOST_FIXTURE_TEST_CASE( DRCMultiNetclasses, DRC_REGRESSION_TEST_FIXTURE ) } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_regressions.cpp b/qa/tests/pcbnew/drc/test_drc_regressions.cpp index 3602d6962f..0b53ebefc1 100644 --- a/qa/tests/pcbnew/drc/test_drc_regressions.cpp +++ b/qa/tests/pcbnew/drc/test_drc_regressions.cpp @@ -105,7 +105,7 @@ BOOST_FIXTURE_TEST_CASE( DRCFalsePositiveRegressions, DRC_REGRESSION_TEST_FIXTUR } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); @@ -196,7 +196,7 @@ BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressions, DRC_REGRESSION_TEST_FIXTUR } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_skew.cpp b/qa/tests/pcbnew/drc/test_drc_skew.cpp index 0da414f24b..6ef860ba9f 100644 --- a/qa/tests/pcbnew/drc/test_drc_skew.cpp +++ b/qa/tests/pcbnew/drc/test_drc_skew.cpp @@ -94,7 +94,7 @@ BOOST_FIXTURE_TEST_CASE( DRCSkew, DRC_REGRESSION_TEST_FIXTURE ) } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_drc_starved_thermal.cpp b/qa/tests/pcbnew/drc/test_drc_starved_thermal.cpp index 5f88a97768..05dabff237 100644 --- a/qa/tests/pcbnew/drc/test_drc_starved_thermal.cpp +++ b/qa/tests/pcbnew/drc/test_drc_starved_thermal.cpp @@ -82,7 +82,7 @@ BOOST_FIXTURE_TEST_CASE( DRCStarvedThermal, DRC_REGRESSION_TEST_FIXTURE ) } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/drc/test_solder_mask_bridging.cpp b/qa/tests/pcbnew/drc/test_solder_mask_bridging.cpp index 40633abebb..f6b0eb78a7 100644 --- a/qa/tests/pcbnew/drc/test_solder_mask_bridging.cpp +++ b/qa/tests/pcbnew/drc/test_solder_mask_bridging.cpp @@ -80,7 +80,7 @@ BOOST_FIXTURE_TEST_CASE( DRCSolderMaskBridgingTest, DRC_SOLDER_MASK_BRIDGING_TES { BOOST_CHECK_EQUAL( violations.size(), expected_err_cnt ); - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/test_tracks_cleaner.cpp b/qa/tests/pcbnew/test_tracks_cleaner.cpp index e122b9fa79..88a582af4e 100644 --- a/qa/tests/pcbnew/test_tracks_cleaner.cpp +++ b/qa/tests/pcbnew/test_tracks_cleaner.cpp @@ -128,7 +128,7 @@ BOOST_DATA_TEST_CASE_F( TRACK_CLEANER_TEST_FIXTURE, FailedToCleanRegressionTests BOOST_CHECK_EQUAL( dryRunItems.size(), entry.m_Expected ); BOOST_CHECK_EQUAL( realRunItems.size(), entry.m_Expected ); - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); @@ -222,7 +222,7 @@ BOOST_DATA_TEST_CASE_F( TRACK_CLEANER_TEST_FIXTURE, TrackCleanerRegressionTests, } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); diff --git a/qa/tests/pcbnew/test_zone_filler.cpp b/qa/tests/pcbnew/test_zone_filler.cpp index 753f0a1081..6e78dc1859 100644 --- a/qa/tests/pcbnew/test_zone_filler.cpp +++ b/qa/tests/pcbnew/test_zone_filler.cpp @@ -214,7 +214,7 @@ BOOST_DATA_TEST_CASE_F( ZONE_FILL_TEST_FIXTURE, RegressionZoneFillTests, } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap ); @@ -261,7 +261,7 @@ BOOST_DATA_TEST_CASE_F( ZONE_FILL_TEST_FIXTURE, RegressionSliverZoneFillTests, } else { - UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::IN ); + UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCH ); std::map<KIID, EDA_ITEM*> itemMap; m_board->FillItemMap( itemMap );