Browse Source

Only test parameters under the same conditions as we'd write them to the file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21520

(cherry picked from commit 8ae2ad3586)
9.0
Jeff Young 1 month ago
parent
commit
905170b4f4
  1. 40
      pcbnew/drc/drc_test_provider_library_parity.cpp

40
pcbnew/drc/drc_test_provider_library_parity.cpp

@ -341,23 +341,29 @@ bool padNeedsUpdate( const PAD* a, const PAD* b, REPORTER* aReporter )
PAD_DESC( a ),
layerName ) );
TEST_D( a->GetRoundRectRadiusRatio( layer ),
b->GetRoundRectRadiusRatio( layer ),
wxString::Format( _( "%s rounded corners differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
TEST_D( a->GetChamferRectRatio( layer ),
b->GetChamferRectRatio( layer ),
wxString::Format( _( "%s chamfered corner sizes differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
TEST( a->GetChamferPositions( layer ),
b->GetChamferPositions( layer ),
wxString::Format( _( "%s chamfered corners differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
if( a->GetShape( layer ) == PAD_SHAPE::ROUNDRECT || a->GetShape( layer ) == PAD_SHAPE::CHAMFERED_RECT)
{
TEST_D( a->GetRoundRectRadiusRatio( layer ),
b->GetRoundRectRadiusRatio( layer ),
wxString::Format( _( "%s rounded corners differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
}
if( a->GetShape( layer ) == PAD_SHAPE::CHAMFERED_RECT)
{
TEST_D( a->GetChamferRectRatio( layer ),
b->GetChamferRectRatio( layer ),
wxString::Format( _( "%s chamfered corner sizes differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
TEST( a->GetChamferPositions( layer ),
b->GetChamferPositions( layer ),
wxString::Format( _( "%s chamfered corners differ on layer %s." ),
PAD_DESC( a ),
layerName ) );
}
TEST_PT( a->GetOffset( layer ), b->GetOffset( layer ),
wxString::Format( _( "%s shape offset from hole differs on layer %s." ),

Loading…
Cancel
Save