|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <settings/settings_manager.h>#include <optional>#include <pcbnew/board.h>#include <pcbnew/pad.h>#include <pcbnew/pcb_track.h>#include <pcbnew/pcbexpr_evaluator.h>#include <pcbnew/generators/pcb_via_stack.h>#include <lset.h>#include <padstack.h>#include <geometry/shape_circle.h>#include <geometry/shape_arc.h>#include <geometry/eda_angle.h>#include <router/pns_block_dragger.h>#include <router/pns_component_dragger.h>#include <router/pns_dragger.h>#include <router/pns_routing_settings.h>#include <router/pns_arc.h>#include <router/pns_line.h>#include <router/pns_item.h>#include <router/pns_kicad_iface.h>#include <router/pns_node.h>#include <router/pns_router.h>#include <router/pns_segment.h>#include <router/pns_shove.h>#include <router/pns_sizes_settings.h>#include <router/pns_solid.h>#include <router/pns_topology.h>#include <router/pns_via.h>Go to the source code of this file.
Classes | |
| class | MOCK_RULE_RESOLVER |
| struct | MOCK_RULE_RESOLVER::ITEM_KEY |
| class | MOCK_PNS_KICAD_IFACE |
| class | PNS_TEST_FIXTURE |
Functions | |
| static bool | isCopper (const PNS::ITEM *aItem) |
| static bool | isHole (const PNS::ITEM *aItem) |
| static bool | isEdge (const PNS::ITEM *aItem) |
| BOOST_FIXTURE_TEST_CASE (PNSShoveOwnsRootLineHistory, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSViaStackHopIsRoutableButLocked, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSViaStackHopIsAnObstacle, PNS_TEST_FIXTURE) | |
| static void | dumpObstacles (const PNS::NODE::OBSTACLES &obstacles) |
| BOOST_FIXTURE_TEST_CASE (PNSHoleCollisions, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSViaBackdrillRetention, PNS_TEST_FIXTURE) | |
| BOOST_AUTO_TEST_CASE (PCBViaBackdrillCloneRetainsData) | |
| BOOST_AUTO_TEST_CASE (PNSLayerRangeSwapBehavior) | |
| Test that PNS_LAYER_RANGE(1, 0) is swapped to (0, 1). | |
| BOOST_FIXTURE_TEST_CASE (PNSSegmentSplitPreservesLockedState, PNS_TEST_FIXTURE) | |
| Test that splitting a locked PNS segment preserves the locked marker on both halves. | |
| BOOST_FIXTURE_TEST_CASE (PNSInheritTrackWidthCursorProximity, PNS_TEST_FIXTURE) | |
| Test that inheritTrackWidth selects the correct track based on cursor proximity. | |
| BOOST_AUTO_TEST_CASE (PCBExprGeometryDependentFunctionDetection) | |
| Test that PCBEXPR_UCODE correctly identifies geometry-dependent functions during compilation. | |
| BOOST_FIXTURE_TEST_CASE (PNSCollideSimpleNullShapeGuard, PNS_TEST_FIXTURE) | |
| Test that collideSimple handles items with null shapes gracefully. | |
| static bool | tracesTouch (PNS::ITEM_SET &aTraces, const VECTOR2I &aPoint, bool aCopperOnly=false) |
| static PNS::SOLID * | makeTestPad (const VECTOR2I &aPos, PNS::NET_HANDLE aNet, int aRadius=500000) |
| static PNS::SEGMENT * | makeTestTrack (const VECTOR2I &aStart, const VECTOR2I &aEnd, PNS::NET_HANDLE aNet) |
| static std::unique_ptr< PNS::NODE > | makeTestWorld (PNS::RULE_RESOLVER *aResolver) |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesSelectedCopper, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerFollowsTrackEndingOffThePadAnchor, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerPinsSelectedTrackInsideUnselectedPad, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesJunctionInsideSelectedPad, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesSelectedArc, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerReroutesSelectedArcHeldAtOneEnd, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesTrackBetweenSelectedPads, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerStretchesTrackHeldAtOneEnd, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerReroutesUnselectedCopper, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerStopsAtTheSelectedCopper, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesCopperBetweenSelectedSegments, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerCarriesViaAndPinsOnUnselectedVia, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerLeavesLockedCopperBehind, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBlockDraggerReportsArcsHeldAtBothEnds, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSComponentDraggerBasicDrag, PNS_TEST_FIXTURE) | |
| Test that COMPONENT_DRAGGER works correctly with basic solid dragging. | |
| BOOST_AUTO_TEST_CASE (PNSLineDragArcResize) | |
| BOOST_AUTO_TEST_CASE (PNSLineDragArcCollapse) | |
| BOOST_FIXTURE_TEST_CASE (PNSDragArcRejectsNear180, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSFinishAnchorNoDanglingBranchItem, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSFinishAnchorCrossesArcInConnectivity, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSCrossNetViaViaElectricalClearanceBaseline, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSSameNetNoPhysicalRulesFastPathNoCollision, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSSameNetWithPhysicalRuleCollides, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSFreePadNoPhysicalRulesFastPath, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSFreePadSafetyNet, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSFreePadPhysicalRuleEnforced, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSSameNetPhysicalHoleClearance, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSSameNetSafetyNetOnOverlap, PNS_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PNSBothPhysicalConstraintsMaxWins, PNS_TEST_FIXTURE) | |
| BOOST_AUTO_TEST_CASE (PNSDiffPairViaGapCopperToHoleClearance) | |
| BOOST_FIXTURE_TEST_CASE (PNSMarkViolationsKeepsPadstackViaShape, PNS_TEST_FIXTURE) | |
| BOOST_AUTO_TEST_CASE (PNSNodeFreesHolesOfItsViasAndSolids) | |
| A world node takes over the holes of the vias and pads added to it, and has to free them with their parents. | |
| BOOST_AUTO_TEST_CASE | ( | PCBExprGeometryDependentFunctionDetection | ) |
Test that PCBEXPR_UCODE correctly identifies geometry-dependent functions during compilation.
Regression test for PNS track drag performance. The geometry-dependent flag controls whether segment-by-segment DRC evaluation is performed during routing. When no geometry-dependent functions exist in clearance rules, the expensive per-segment evaluation is skipped.
Definition at line 832 of file test_pns_basics.cpp.
References LIBEVAL::COMPILER::Compile(), F_Cu, and PCBEXPR_UCODE::HasGeometryDependentFunctions().
| BOOST_AUTO_TEST_CASE | ( | PCBViaBackdrillCloneRetainsData | ) |
Definition at line 628 of file test_pns_basics.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), COUNTERBORE, COUNTERSINK, F_Cu, In2_Cu, In4_Cu, and via.
| BOOST_AUTO_TEST_CASE | ( | PNSDiffPairViaGapCopperToHoleClearance | ) |
Definition at line 2094 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), PNS::SIZES_SETTINGS::EffectiveDiffPairViaGap(), PNS::SIZES_SETTINGS::GetDiffPairCopperToHole(), PNS::SIZES_SETTINGS::SetDiffPairCopperToHole(), PNS::SIZES_SETTINGS::SetDiffPairHoleToHole(), PNS::SIZES_SETTINGS::SetDiffPairViaGap(), PNS::SIZES_SETTINGS::SetDiffPairViaGapSameAsTraceGap(), PNS::SIZES_SETTINGS::SetViaDiameter(), and PNS::SIZES_SETTINGS::SetViaDrill().
| BOOST_AUTO_TEST_CASE | ( | PNSLayerRangeSwapBehavior | ) |
Test that PNS_LAYER_RANGE(1, 0) is swapped to (0, 1).
This is a minimal regression test for https://gitlab.com/kicad/code/kicad/-/issues/20355 The actual fix is in pns_kicad_iface.cpp syncPad() which skips creating an INNER_LAYERS SOLID on 2-layer boards. This test verifies the layer range behavior that motivated the fix.
Definition at line 688 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), PNS_LAYER_RANGE::End(), PNS_LAYER_RANGE::Overlaps(), and PNS_LAYER_RANGE::Start().
| BOOST_AUTO_TEST_CASE | ( | PNSLineDragArcCollapse | ) |
Definition at line 1638 of file test_pns_basics.cpp.
References SHAPE_LINE_CHAIN::ArcCount(), BOOST_CHECK_EQUAL(), chain, PNS::LINE::CLine(), DEGREES_T, PNS::LINE::DragArc(), PNS::LINE::Line(), SHAPE_LINE_CHAIN::PointCount(), and PNS::LINE::SetWidth().
| BOOST_AUTO_TEST_CASE | ( | PNSLineDragArcResize | ) |
Definition at line 1609 of file test_pns_basics.cpp.
References SHAPE_LINE_CHAIN::ArcCount(), BOOST_CHECK_EQUAL(), SHAPE_LINE_CHAIN::CArcs(), chain, PNS::LINE::CLine(), DEGREES_T, PNS::LINE::DragArc(), PNS::LINE::Line(), SHAPE_LINE_CHAIN::PointCount(), and PNS::LINE::SetWidth().
| BOOST_AUTO_TEST_CASE | ( | PNSNodeFreesHolesOfItsViasAndSolids | ) |
A world node takes over the holes of the vias and pads added to it, and has to free them with their parents.
The router rebuilds its world on every settings change.
Definition at line 2218 of file test_pns_basics.cpp.
References PNS::NODE::Add(), PNS::NODE::AddRaw(), B_Cu, BOOST_CHECK_EQUAL(), F_Cu, PNS::NODE::Remove(), PNS::VIA::SetHole(), and via.
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesCopperBetweenSelectedSegments | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1387 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesJunctionInsideSelectedPad | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1102 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesSelectedArc | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1147 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), PNS::BLOCK_DRAGGER::AnchoredLines(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), F_Cu, makeTestWorld(), PNS::NODE::Overrides(), PNS::ITEM::SetLayers(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesSelectedCopper | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 994 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesTrackBetweenSelectedPads | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1225 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerCarriesViaAndPinsOnUnselectedVia | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1430 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), B_Cu, BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), F_Cu, makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerFollowsTrackEndingOffThePadAnchor | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1030 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerLeavesLockedCopperBehind | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1470 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), locked, makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::MK_LOCKED, PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerPinsSelectedTrackInsideUnselectedPad | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1065 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerReportsArcsHeldAtBothEnds | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1507 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), PNS::BLOCK_DRAGGER::AnchoredLines(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), PNS::BLOCK_DRAGGER::Drag(), F_Cu, makeTestPad(), makeTestWorld(), PNS::NODE::Overrides(), PNS::ITEM::SetLayers(), PNS::DRAG_ALGO::SetWorld(), and PNS::BLOCK_DRAGGER::Start().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerReroutesSelectedArcHeldAtOneEnd | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1181 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), PNS::BLOCK_DRAGGER::AnchoredLines(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), F_Cu, PNS::ITEM_SET::Items(), PNS::ITEM::LINE_T, makeTestPad(), makeTestWorld(), PNS::NODE::Overrides(), PNS::ITEM::SetLayers(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerReroutesUnselectedCopper | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1304 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerStopsAtTheSelectedCopper | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1343 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), pad, PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBlockDraggerStretchesTrackHeldAtOneEnd | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1266 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::BLOCK_DRAGGER::CurrentNode(), delta, PNS::BLOCK_DRAGGER::Drag(), makeTestPad(), makeTestTrack(), makeTestWorld(), PNS::NODE::Overrides(), PNS::DRAG_ALGO::SetWorld(), PNS::BLOCK_DRAGGER::Start(), PNS::BLOCK_DRAGGER::Traces(), and tracesTouch().
| BOOST_FIXTURE_TEST_CASE | ( | PNSBothPhysicalConstraintsMaxWins | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 2056 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), makeVia(), pad, and via.
| BOOST_FIXTURE_TEST_CASE | ( | PNSCollideSimpleNullShapeGuard | , |
| PNS_TEST_FIXTURE | ) |
Test that collideSimple handles items with null shapes gracefully.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23851 When ITEM::Shape() returns nullptr, collision checking must not crash. The syncPad fix prevents null-shape SOLIDs from entering the PNS world, but collideSimple should also be defensive.
Definition at line 881 of file test_pns_basics.cpp.
References PNS::ITEM::Collide(), F_Cu, PNS::ITEM::SetLayers(), PNS::ITEM::SetNet(), PNS::SOLID::SetPos(), and PNS::SOLID::SetShape().
| BOOST_FIXTURE_TEST_CASE | ( | PNSComponentDraggerBasicDrag | , |
| PNS_TEST_FIXTURE | ) |
Test that COMPONENT_DRAGGER works correctly with basic solid dragging.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23851 Exercises the component dragger Start() and multiple Drag() calls to ensure no crashes occur during the drag sequence. This simulates the core PNS operations that happen during an InlineDrag (G key) of a footprint.
Definition at line 1545 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), BOOST_REQUIRE(), PNS::COMPONENT_DRAGGER::CurrentNode(), PNS::COMPONENT_DRAGGER::Drag(), F_Cu, PNS::ITEM::SetLayers(), PNS::ITEM::SetNet(), PNS::SOLID::SetPos(), PNS::ITEM::SetRoutable(), PNS::SOLID::SetShape(), PNS::SEGMENT::SetWidth(), PNS::DRAG_ALGO::SetWorld(), PNS::ITEM_SET::Size(), PNS::COMPONENT_DRAGGER::Start(), and PNS::COMPONENT_DRAGGER::Traces().
| BOOST_FIXTURE_TEST_CASE | ( | PNSCrossNetViaViaElectricalClearanceBaseline | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1873 of file test_pns_basics.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | PNSDragArcRejectsNear180 | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1663 of file test_pns_basics.cpp.
References PNS::ITEM_SET::Add(), PNS::ARC::Anchor(), DEGREES_T, PNS::DM_ARC, F_Cu, makeArc(), PNS::ITEM::SetLayers(), PNS::DRAGGER::SetMode(), PNS::DRAG_ALGO::SetWorld(), and PNS::DRAGGER::Start().
| BOOST_FIXTURE_TEST_CASE | ( | PNSFinishAnchorCrossesArcInConnectivity | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1813 of file test_pns_basics.cpp.
References PNS::NODE::AddRaw(), SHAPE_LINE_CHAIN::Append(), BOOST_CHECK_EQUAL(), F_Cu, PNS::LINE::Line(), PNS::ITEM::SetLayers(), PNS::NODE::SetMaxClearance(), PNS::ITEM::SetNet(), PNS::NODE::SetRuleResolver(), PNS::LINE::SetWidth(), and PNS::SEGMENT::SetWidth().
| BOOST_FIXTURE_TEST_CASE | ( | PNSFinishAnchorNoDanglingBranchItem | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1776 of file test_pns_basics.cpp.
References PNS::NODE::AddRaw(), SHAPE_LINE_CHAIN::Append(), BOOST_CHECK_EQUAL(), F_Cu, PNS::LINE::Line(), PNS::ITEM::SetLayers(), PNS::NODE::SetMaxClearance(), PNS::ITEM::SetNet(), PNS::NODE::SetRuleResolver(), PNS::LINE::SetWidth(), and PNS::SEGMENT::SetWidth().
| BOOST_FIXTURE_TEST_CASE | ( | PNSFreePadNoPhysicalRulesFastPath | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1941 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), and makeVia().
| BOOST_FIXTURE_TEST_CASE | ( | PNSFreePadPhysicalRuleEnforced | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1988 of file test_pns_basics.cpp.
References makeVia().
| BOOST_FIXTURE_TEST_CASE | ( | PNSFreePadSafetyNet | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1965 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), and makeVia().
| BOOST_FIXTURE_TEST_CASE | ( | PNSHoleCollisions | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 510 of file test_pns_basics.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), dumpObstacles(), F_Cu, v1, and v2.
| BOOST_FIXTURE_TEST_CASE | ( | PNSInheritTrackWidthCursorProximity | , |
| PNS_TEST_FIXTURE | ) |
Test that inheritTrackWidth selects the correct track based on cursor proximity.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/19123 When a pad has multiple tracks of different widths, the router should inherit the width of the track closest to the cursor, not just the minimum width.
Definition at line 766 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), F_Cu, pad, PNS::ITEM::SetLayers(), and PNS::SEGMENT::SetWidth().
| BOOST_FIXTURE_TEST_CASE | ( | PNSMarkViolationsKeepsPadstackViaShape | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 2171 of file test_pns_basics.cpp.
References BOOST_REQUIRE(), PNS::PNS_MODE_ROUTE_SINGLE, PNS::SIZES_SETTINGS::SetBoardMinTrackWidth(), and PNS::SIZES_SETTINGS::SetTrackWidth().
| BOOST_FIXTURE_TEST_CASE | ( | PNSSameNetNoPhysicalRulesFastPathNoCollision | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1894 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), makeVia(), and v1.
| BOOST_FIXTURE_TEST_CASE | ( | PNSSameNetPhysicalHoleClearance | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 2011 of file test_pns_basics.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | PNSSameNetSafetyNetOnOverlap | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 2033 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), makeVia(), and v1.
| BOOST_FIXTURE_TEST_CASE | ( | PNSSameNetWithPhysicalRuleCollides | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 1917 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), makeVia(), and v1.
| BOOST_FIXTURE_TEST_CASE | ( | PNSSegmentSplitPreservesLockedState | , |
| PNS_TEST_FIXTURE | ) |
Test that splitting a locked PNS segment preserves the locked marker on both halves.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/21564 When a locked track is split by a new route connecting to its middle, both resulting segments must retain the locked state.
Definition at line 722 of file test_pns_basics.cpp.
References BOOST_CHECK_EQUAL(), PNS::Clone(), F_Cu, PNS::ITEM::IsLocked(), PNS::ITEM::Mark(), PNS::MK_LOCKED, PNS::ITEM::SetLayers(), PNS::SEGMENT::SetWidth(), and PNS::SEGMENT::Width().
| BOOST_FIXTURE_TEST_CASE | ( | PNSShoveOwnsRootLineHistory | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 386 of file test_pns_basics.cpp.
References SHAPE_LINE_CHAIN::Append(), F_Cu, PNS::LINE::Line(), PNS::ITEM::SetLayers(), PNS::NODE::SetRuleResolver(), PNS::SHOVE::SetShovePolicy(), and PNS::SHOVE::SHP_SHOVE.
| BOOST_FIXTURE_TEST_CASE | ( | PNSViaBackdrillRetention | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 590 of file test_pns_basics.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), COUNTERSINK, F_Cu, In1_Cu, In2_Cu, NOT_POST_MACHINED, THROUGH, and via.
| BOOST_FIXTURE_TEST_CASE | ( | PNSViaStackHopIsAnObstacle | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 448 of file test_pns_basics.cpp.
References BOARD::Add(), LSET::AllCuMask(), LSET::AllTechMask(), B_Cu, BOOST_REQUIRE(), F_Cu, PCB_GROUP::GetBoardItems(), In2_Cu, PCB_VIA_T, PCB_VIA_STACK::Regenerate(), BOARD::SetCopperLayerCount(), BOARD::SetEnabledLayers(), PCB_VIA_STACK::SetEndLayer(), PNS::ITEM::SetNet(), PCB_GENERATOR::SetPosition(), PCB_VIA_STACK::SetStartLayer(), PCB_VIA_STACK::SetViaDrill(), and PCB_VIA_STACK::SetViaSize().
| BOOST_FIXTURE_TEST_CASE | ( | PNSViaStackHopIsRoutableButLocked | , |
| PNS_TEST_FIXTURE | ) |
Definition at line 409 of file test_pns_basics.cpp.
References BOARD::Add(), LSET::AllCuMask(), LSET::AllTechMask(), BOOST_REQUIRE(), F_Cu, PCB_GROUP::GetBoardItems(), In2_Cu, PCB_VIA_T, PCB_VIA_STACK::Regenerate(), BOARD::SetCopperLayerCount(), BOARD::SetEnabledLayers(), PCB_VIA_STACK::SetEndLayer(), PCB_GENERATOR::SetPosition(), PCB_VIA_STACK::SetStartLayer(), PCB_VIA_STACK::SetViaDrill(), and PCB_VIA_STACK::SetViaSize().
|
static |
Definition at line 499 of file test_pns_basics.cpp.
References BOOST_TEST_MESSAGE().
Referenced by BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 53 of file test_pns_basics.cpp.
References pad, PNS::ITEM::Parent(), PCB_PAD_T, and EDA_ITEM::Type().
Referenced by MOCK_RULE_RESOLVER::Clearance().
|
static |
Definition at line 81 of file test_pns_basics.cpp.
References PNS::ITEM::BoardItem(), Edge_Cuts, BOARD_ITEM::IsOnLayer(), and Margin.
Referenced by MOCK_RULE_RESOLVER::Clearance().
|
static |
Definition at line 72 of file test_pns_basics.cpp.
References PNS::ITEM::HOLE_T, and PNS::ITEM::OfKind().
Referenced by MOCK_RULE_RESOLVER::Clearance().
|
static |
Definition at line 957 of file test_pns_basics.cpp.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 971 of file test_pns_basics.cpp.
References F_Cu, PNS::ITEM::SetLayers(), and PNS::SEGMENT::SetWidth().
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 982 of file test_pns_basics.cpp.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 924 of file test_pns_basics.cpp.
References chain, PNS::ITEM_SET::Items(), PNS::ITEM::LINE_T, PNS::ITEM::SOLID_T, and PNS::ITEM::VIA_T.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().