|
KiCad PCB EDA Suite
|
Tests for DRC and connectivity checks related to backdrilling and post-machining. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <board.h>#include <board_design_settings.h>#include <board_stackup_manager/board_stackup.h>#include <connectivity/connectivity_data.h>#include <drc/drc_engine.h>#include <drc/drc_item.h>#include <footprint.h>#include <netclass.h>#include <pad.h>#include <pcb_track.h>#include <pcb_marker.h>#include <settings/settings_manager.h>#include <zone.h>#include <zone_filler.h>Go to the source code of this file.
Classes | |
| struct | BACKDRILL_TEST_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (ViaBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Test that IsBackdrilledOrPostMachined correctly identifies affected layers for vias. | |
| BOOST_FIXTURE_TEST_CASE (ViaBottomBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Regression test for GitLab #23902. | |
| BOOST_FIXTURE_TEST_CASE (ViaPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Test that IsBackdrilledOrPostMachined correctly identifies affected layers for post-machining. | |
| BOOST_FIXTURE_TEST_CASE (PadBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Test that IsBackdrilledOrPostMachined correctly identifies affected layers for pads. | |
| BOOST_FIXTURE_TEST_CASE (ViaEffectiveShapeOnBackdrilledLayer, BACKDRILL_TEST_FIXTURE) | |
| Test that the backdrill widens the hole and the physical extents on affected layers, but leaves the copper shape alone. | |
| BOOST_FIXTURE_TEST_CASE (ZoneConnectivityWithBackdrill, BACKDRILL_TEST_FIXTURE) | |
| Test that connectivity correctly excludes backdrilled layers for zones. | |
| BOOST_FIXTURE_TEST_CASE (DRCTrackOnPostMachinedLayer, BACKDRILL_TEST_FIXTURE) | |
| Test DRC error for track connected to post-machined layer. | |
| BOOST_FIXTURE_TEST_CASE (DRCTrackOnBackdrilledLayer, BACKDRILL_TEST_FIXTURE) | |
| Test DRC error for track connected to backdrilled layer. | |
| BOOST_FIXTURE_TEST_CASE (DRCTrackOnUnaffectedLayerNoDRC, BACKDRILL_TEST_FIXTURE) | |
| Test that tracks on non-affected layers don't trigger DRC errors. | |
| BOOST_FIXTURE_TEST_CASE (DRCTrackOnBackdrilledPadLayer, BACKDRILL_TEST_FIXTURE) | |
| Test DRC for pad with backdrill and connected track. | |
| BOOST_FIXTURE_TEST_CASE (PadPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Test that pad post-machining is correctly detected. | |
| BOOST_FIXTURE_TEST_CASE (PadBackPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE) | |
| Test back post-machining detection. | |
| BOOST_FIXTURE_TEST_CASE (ViaBothBackdrillAndPostMachining, BACKDRILL_TEST_FIXTURE) | |
| Combined test: both backdrill and post-machining on same via. | |
| BOOST_FIXTURE_TEST_CASE (CountersinkAngleDecidegrees, BACKDRILL_TEST_FIXTURE) | |
| Verify that countersink angle is stored in decidegrees and the property system round-trips correctly. | |
| BOOST_FIXTURE_TEST_CASE (PadEffectiveShapeOnBackdrilledInnerLayer, BACKDRILL_TEST_FIXTURE) | |
| A normal padstack holds one shape, stored under PADSTACK::ALL_LAYERS. | |
| BOOST_FIXTURE_TEST_CASE (ViaHoleShapeUsesNetclassDrill, BACKDRILL_TEST_FIXTURE) | |
| A via can leave its drill unset and inherit the netclass value. | |
Tests for DRC and connectivity checks related to backdrilling and post-machining.
Definition in file test_drc_backdrill_postmachining.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | CountersinkAngleDecidegrees | , |
| BACKDRILL_TEST_FIXTURE | ) |
Verify that countersink angle is stored in decidegrees and the property system round-trips correctly.
Regression test for GitLab #23134.
Definition at line 696 of file test_drc_backdrill_postmachining.cpp.
References PADSTACK::ALL_LAYERS, PADSTACK::POST_MACHINING_PROPS::angle, B_Cu, BOOST_CHECK_EQUAL(), COUNTERSINK, F_Cu, PADSTACK::NORMAL, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | DRCTrackOnBackdrilledLayer | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test DRC error for track connected to backdrilled layer.
Definition at line 509 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In1_Cu, In2_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | DRCTrackOnBackdrilledPadLayer | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test DRC for pad with backdrill and connected track.
Definition at line 574 of file test_drc_backdrill_postmachining.cpp.
References DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In1_Cu, In2_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.
| BOOST_FIXTURE_TEST_CASE | ( | DRCTrackOnPostMachinedLayer | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test DRC error for track connected to post-machined layer.
Definition at line 481 of file test_drc_backdrill_postmachining.cpp.
References COUNTERBORE, DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | DRCTrackOnUnaffectedLayerNoDRC | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that tracks on non-affected layers don't trigger DRC errors.
Definition at line 537 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In2_Cu, EDA_ITEM::m_Uuid, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | PadBackdrillLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that IsBackdrilledOrPostMachined correctly identifies affected layers for pads.
Definition at line 358 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.
| BOOST_FIXTURE_TEST_CASE | ( | PadBackPostMachiningLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test back post-machining detection.
Definition at line 628 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, COUNTERSINK, F_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.
| BOOST_FIXTURE_TEST_CASE | ( | PadEffectiveShapeOnBackdrilledInnerLayer | , |
| BACKDRILL_TEST_FIXTURE | ) |
A normal padstack holds one shape, stored under PADSTACK::ALL_LAYERS.
A backdrilled pad queried on an inner layer must still find that shape instead of throwing.
Definition at line 744 of file test_drc_backdrill_postmachining.cpp.
References ALWAYS_FLASHED, B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), F_Cu, In1_Cu, In2_Cu, PADSTACK::NORMAL, pad, FOOTPRINT::Pads(), pcbIUScale, PHYSICAL_CLEARANCE_CONSTRAINT, and SILK_CLEARANCE_CONSTRAINT.
| BOOST_FIXTURE_TEST_CASE | ( | PadPostMachiningLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that pad post-machining is correctly detected.
Definition at line 602 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, COUNTERBORE, F_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.
| BOOST_FIXTURE_TEST_CASE | ( | ViaBackdrillLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that IsBackdrilledOrPostMachined correctly identifies affected layers for vias.
Definition at line 276 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | ViaBothBackdrillAndPostMachining | , |
| BACKDRILL_TEST_FIXTURE | ) |
Combined test: both backdrill and post-machining on same via.
Definition at line 654 of file test_drc_backdrill_postmachining.cpp.
References PADSTACK::ALL_LAYERS, B_Cu, COUNTERBORE, F_Cu, In2_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | ViaBottomBackdrillLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Regression test for GitLab #23902.
Iterating LAYER_RANGE walked PCB_LAYER_ID enum order, so a bottom-anchored backdrill (B_Cu to In3_Cu) wrongly flagged the top inner layers and skipped the actually-drilled In4_Cu. A bottom backdrill must report only the bottom-side copper as machined.
Definition at line 307 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, In4_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | ViaEffectiveShapeOnBackdrilledLayer | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that the backdrill widens the hole and the physical extents on affected layers, but leaves the copper shape alone.
Definition at line 388 of file test_drc_backdrill_postmachining.cpp.
References PADSTACK::ALL_LAYERS, B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CLEARANCE_CONSTRAINT, DEFAULT, F_Cu, In2_Cu, pcbIUScale, PHYSICAL_CLEARANCE_CONSTRAINT, and via.
| BOOST_FIXTURE_TEST_CASE | ( | ViaHoleShapeUsesNetclassDrill | , |
| BACKDRILL_TEST_FIXTURE | ) |
A via can leave its drill unset and inherit the netclass value.
The hole shape must resolve that fallback, or hole-to-hole DRC measures from a zero-width hole and reports nothing.
Definition at line 790 of file test_drc_backdrill_postmachining.cpp.
References PADSTACK::ALL_LAYERS, B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DRCE_DRILLED_HOLES_TOO_CLOSE, F_Cu, PCB_VIA::GetDrillValue(), PCB_VIA::GetEffectiveHoleShape(), HOLE_TO_HOLE_CONSTRAINT, DRC_ENGINE::InitEngine(), BOARD_DESIGN_SETTINGS::m_DRCEngine, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, EDA_ITEM::m_Uuid, PADSTACK::NORMAL, pcbIUScale, UNDEFINED_LAYER, via, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | ViaPostMachiningLayerDetection | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that IsBackdrilledOrPostMachined correctly identifies affected layers for post-machining.
Definition at line 334 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, COUNTERSINK, F_Cu, pcbIUScale, and via.
| BOOST_FIXTURE_TEST_CASE | ( | ZoneConnectivityWithBackdrill | , |
| BACKDRILL_TEST_FIXTURE | ) |
Test that connectivity correctly excludes backdrilled layers for zones.
Definition at line 436 of file test_drc_backdrill_postmachining.cpp.
References B_Cu, F_Cu, In2_Cu, pcbIUScale, and via.