43 std::vector<std::pair<wxString, int>> tests =
45 {
"incorrect_text_mirroring_drc", 8 }
48 for(
const std::pair<wxString, int>&
test : tests )
53 std::vector<DRC_ITEM> violations;
65 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
67 if( bds.GetSeverity( aItem->GetErrorCode() ) == SEVERITY::RPT_SEVERITY_ERROR )
68 violations.push_back( *aItem );
73 if( violations.size() ==
test.second )
75 BOOST_CHECK_EQUAL( 1, 1 );
76 BOOST_TEST_MESSAGE( wxString::Format(
"DRC incorrect text mirror test: %s, passed",
test.first ) );
82 std::map<KIID, EDA_ITEM*> itemMap;
83 m_board->FillItemMap( itemMap );
85 for(
const DRC_ITEM& item : violations )
90 BOOST_ERROR( wxString::Format(
"DRC incorrect text mirror test: %s, failed (violations found %d expected %d)",
91 test.first, (
int)violations.size(),
test.second ) );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
@ DRCE_MIRRORED_TEXT_ON_FRONT_LAYER
@ DRCE_NONMIRRORED_TEXT_ON_BACK_LAYER
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void FillZones(BOARD *m_board)
SETTINGS_MANAGER m_settingsManager
DRC_INCORRECT_TEXT_MIRROR_TEST_FIXTURE()
std::unique_ptr< BOARD > m_board
BOOST_FIXTURE_TEST_CASE(DRCIncorrectTextMirror, DRC_INCORRECT_TEXT_MIRROR_TEST_FIXTURE)