|
KiCad PCB EDA Suite
|
#include <algorithm>#include <chrono>#include <memory>#include <thread>#include <qa_utils/wx_utils/unit_test_utils.h>#include <board.h>#include <footprint.h>#include <gal/gal_display_options.h>#include <gal/graphics_abstraction_layer.h>#include <pad.h>#include <pcb_painter.h>#include <pcb_shape.h>#include <pcb_track.h>#include <pcb_view.h>#include <pcbnew_settings.h>#include <tool/tool_manager.h>#include <tools/pcb_grid_helper.h>#include <tools/pcb_tool_base.h>Go to the source code of this file.
Functions | |
| BOOST_FIXTURE_TEST_CASE (DisabledSnapUsesGridWhenEnabled, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (DisabledSnapUsesCursorWhenGridDisabled, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (TrackEndpointWinsOverGrid, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (IntrinsicAnchorWinsOverConstructionLine, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RetainedAnchorUsesSnapOutThreshold, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (ReferenceOnlyPointUpdatesGuideWithoutSnapping, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (DefaultInferenceSnapsToElementWithGridEnabled, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (AlignmentFindsTargetFarAlongGuideDirection, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (EqualSpacingFindsTargetsFarAlongSpacingAxis, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (FootprintEditorSpacesPadsEvenly, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (BoardKeepsPadsInsideTheirFootprint, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (DraggedPadDoesNotAlignToItsOwnStartPosition, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (LegacyFallbackSuppressesPointOnElementWhenGridEnabled, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (TrackMagnetismTogglesIndependently, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (GraphicsMagnetismAndLayerMatchingToggleIndependently, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (PadMagnetismTogglesIndependently, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (FeasibilityFallsBackToNextObjectCandidate, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (AcceptedAnchorDrivesPresentationPayload, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (CoincidentAcceptedIdSelectsOwningAnchorPayload, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (AlignmentGuideSurvivesPresentationReset, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (DenseCoincidentTieRetainsPartialBudgetResult, PCB_SNAP_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE | ( | AcceptedAnchorDrivesPresentationPayload | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 508 of file test_pcb_snap_pipeline.cpp.
References anchor, BOOST_CHECK_EQUAL(), F_Cu, INTRINSIC_ANCHOR, MM, PT_END, and result.
| BOOST_FIXTURE_TEST_CASE | ( | AlignmentFindsTargetFarAlongGuideDirection | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 292 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, F_SilkS, EDA_SHAPE::GetStart(), GRID_CURRENT, PCBNEW_SETTINGS::m_SnapInference, MM, result, and KIGFX::VIEW::SetViewport().
| BOOST_FIXTURE_TEST_CASE | ( | AlignmentGuideSurvivesPresentationReset | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 582 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), F_SilkS, SNAP_LINE_MANAGER::GetSnapLineOrigin(), EDA_SHAPE::GetStart(), GRID_CURRENT, SNAP_LINE_MANAGER::HasCompleteSnapLine(), PCBNEW_SETTINGS::m_SnapInference, MM, and result.
| BOOST_FIXTURE_TEST_CASE | ( | BoardKeepsPadsInsideTheirFootprint | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 354 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, F_Cu, PAD::GetPosition(), GRID_CURRENT, PCBNEW_SETTINGS::m_SnapInference, MM, result, and KIGFX::VIEW::SetViewport().
| BOOST_FIXTURE_TEST_CASE | ( | CoincidentAcceptedIdSelectsOwningAnchorPayload | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 536 of file test_pcb_snap_pipeline.cpp.
References SNAP_RESULT::accepted, MAGNETIC_SETTINGS::allLayers, anchor, B_Cu, BOOST_CHECK_EQUAL(), SNAP_INFERENCE_SETTINGS::constructionExtensions, F_Cu, INCOMPATIBLE, KiROUND(), PCBNEW_SETTINGS::m_SnapInference, MM, SNAP_INFERENCE_SETTINGS::objectGeometry, PT_END, result, BOARD_CONNECTED_ITEM::SetLayer(), and SNAP_SOURCE_CONTEXT::sourcePoint.
| BOOST_FIXTURE_TEST_CASE | ( | DefaultInferenceSnapsToElementWithGridEnabled | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 280 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), cursor, F_Cu, MM, and result.
| BOOST_FIXTURE_TEST_CASE | ( | DenseCoincidentTieRetainsPartialBudgetResult | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 603 of file test_pcb_snap_pipeline.cpp.
References anchor, KIID::AsBytes(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BUDGET_EXHAUSTED, SNAP_INFERENCE_SETTINGS::constructionExtensions, F_Cu, INTRINSIC_ANCHOR, KiROUND(), PCBNEW_SETTINGS::m_SnapInference, EDA_ITEM::m_Uuid, MakeCompositeSnapId(), MakePointSnapId(), MM, SNAP_INFERENCE_SETTINGS::objectGeometry, result, SNAP_SOURCE_CONTEXT::sourcePoint, and SNAP_STABLE_ID::target.
| BOOST_FIXTURE_TEST_CASE | ( | DisabledSnapUsesCursorWhenGridDisabled | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 200 of file test_pcb_snap_pipeline.cpp.
References LSET::AllLayersMask(), BOOST_CHECK_EQUAL(), cursor, and result.
| BOOST_FIXTURE_TEST_CASE | ( | DisabledSnapUsesGridWhenEnabled | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 188 of file test_pcb_snap_pipeline.cpp.
References LSET::AllLayersMask(), BOOST_CHECK_EQUAL(), BOOST_FIXTURE_TEST_CASE(), MM, and result.
| BOOST_FIXTURE_TEST_CASE | ( | DraggedPadDoesNotAlignToItsOwnStartPosition | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 374 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, cursor, F_Cu, PAD::GetPosition(), GRID_CURRENT, PCBNEW_SETTINGS::m_SnapInference, MM, result, KIGFX::VIEW::SetViewport(), and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | EqualSpacingFindsTargetsFarAlongSpacingAxis | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 315 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, F_SilkS, GRID_CURRENT, PCBNEW_SETTINGS::m_SnapInference, MM, result, and KIGFX::VIEW::SetViewport().
| BOOST_FIXTURE_TEST_CASE | ( | FeasibilityFallsBackToNextObjectCandidate | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 473 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), F_SilkS, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), GRID_CURRENT, INCOMPATIBLE, KiROUND(), SNAP_CANDIDATE::origin, result, SNAP_SOURCE_CONTEXT::sourcePoint, and VECTOR2< T >::x.
| BOOST_FIXTURE_TEST_CASE | ( | FootprintEditorSpacesPadsEvenly | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 334 of file test_pcb_snap_pipeline.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, F_Cu, FPHOLDER, PAD::GetPosition(), GRID_CURRENT, PCBNEW_SETTINGS::m_SnapInference, MM, result, BOARD::SetBoardUse(), and KIGFX::VIEW::SetViewport().
| BOOST_FIXTURE_TEST_CASE | ( | GraphicsMagnetismAndLayerMatchingToggleIndependently | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 434 of file test_pcb_snap_pipeline.cpp.
References MAGNETIC_SETTINGS::allLayers, anchor, B_SilkS, BOOST_CHECK_EQUAL(), F_Cu, MAGNETIC_SETTINGS::graphics, and MM.
| BOOST_FIXTURE_TEST_CASE | ( | IntrinsicAnchorWinsOverConstructionLine | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 230 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), cursor, F_Cu, PCB_TRACK::GetStart(), MM, SNAP_RESULT::position, and result.
| BOOST_FIXTURE_TEST_CASE | ( | LegacyFallbackSuppressesPointOnElementWhenGridEnabled | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 397 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), cursor, F_Cu, PCBNEW_SETTINGS::m_SnapInference, MM, SNAP_INFERENCE_SETTINGS::objectGeometry, SNAP_RESULT::position, and PT_ON_ELEMENT.
| BOOST_FIXTURE_TEST_CASE | ( | PadMagnetismTogglesIndependently | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 453 of file test_pcb_snap_pipeline.cpp.
References MAGNETIC_SETTINGS::allLayers, anchor, B_Cu, BOOST_CHECK_EQUAL(), CAPTURE_ALWAYS, CAPTURE_CURSOR_IN_TRACK_TOOL, F_Cu, MM, NO_EFFECT, pad, and MAGNETIC_SETTINGS::pads.
| BOOST_FIXTURE_TEST_CASE | ( | ReferenceOnlyPointUpdatesGuideWithoutSnapping | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 264 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), F_Cu, MM, and result.
| BOOST_FIXTURE_TEST_CASE | ( | RetainedAnchorUsesSnapOutThreshold | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 246 of file test_pcb_snap_pipeline.cpp.
References anchor, BOOST_CHECK_EQUAL(), F_Cu, MM, and SNAP_RESULT::position.
| BOOST_FIXTURE_TEST_CASE | ( | TrackEndpointWinsOverGrid | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 213 of file test_pcb_snap_pipeline.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), F_Cu, KIGFX::VIEW::GetScale(), PCB_TRACK::GetStart(), KIGFX::VIEW::IsVisible(), MM, KIGFX::VIEW::Query(), result, and PCB_TRACK::ViewGetLOD().
| BOOST_FIXTURE_TEST_CASE | ( | TrackMagnetismTogglesIndependently | , |
| PCB_SNAP_FIXTURE | ) |
Definition at line 414 of file test_pcb_snap_pipeline.cpp.
References MAGNETIC_SETTINGS::allLayers, anchor, B_Cu, BOOST_CHECK_EQUAL(), CAPTURE_ALWAYS, CAPTURE_CURSOR_IN_TRACK_TOOL, F_Cu, MM, NO_EFFECT, and MAGNETIC_SETTINGS::tracks.