KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_constraint_drag.cpp File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <vector>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <tool/tool_manager.h>
#include <pcbnew_utils/board_test_utils.h>
#include <board.h>
#include <board_commit.h>
#include <pcb_dimension.h>
#include <pcb_shape.h>
#include <geometry/shape_arc.h>
#include <constraints/pcb_constraint.h>
#include <constraints/board_constraint_adapter.h>
#include <constraints/constraint_builder.h>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (DragReDerivesNeighborRevertRestores, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentDragSessionWarmStartsSuccessivePreviewFrames, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentDragSessionRejectsInexactSnapTarget, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentDragSessionExactifiesEqualGapTarget, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionArbitratesBeforeApplying, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (RigidTranslationPreservesRoundShapeRadii, DRAG_FIXTURE)
 
 BOOST_AUTO_TEST_CASE (UnbuiltMoveSessionRejectsCandidates)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionRejectsIncompatibleTarget, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionFallsBackAfterRejectedObject, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionReportsEachAcceptedSnapOnce, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionJointlySolvesAuthoredAndObjectManifolds, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentMoveSessionJointlySolvesDisconnectedClusters, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentDragSessionFindsJointlyFeasibleManifoldPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PersistentDragSessionPreservesGeometryOnBaseConflict, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (WholeClusterMoveSurvivesPreExistingConflict, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (WholeClusterMoveWithFixedPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (DragFreeCornerBesideFixedPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PinnedClusterStaysSnappableAtRest, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PartialClusterMoveBesideFixedPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (DragCircleCentreMovesConcentricNeighbor, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (UnsolvableClusterLeavesNeighborUntouched, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (DeleteShapeLeavesConstraintInErrorState, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (MoveReSolvesCluster, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (MoveReSolveStagesNeighborsRevertRestores, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (MoveCommitEqualsLastPaintedPreview, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (MoveEmptyShapesStagesNoNeighbor, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (FixedLengthDragPinsFarEnd, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (FixedLengthDragOffCircleHoldsFarEnd, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (ArcEndpointDragHoldsCircleAndFarEnd, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (ArcEndpointDragYieldsToFixedRadius, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (RectCornerDragHoldsOppositeCorner, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PolyVertexDragHoldsOtherVertices, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (VertexForRectCornerMapsCanonicalIndex, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (VertexForPolyMapsOrdinal, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (RectCornerDragMapsThenSolves, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (ClampedRectCornerDragSolvesToClampedCorner, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (RectSideDragEnforcesDrivingWidth, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (RectSideDragOffConstrainedAxisResizes, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (UnconstrainedRectSideDragResizesExactly, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (PolyEdgeDragEnforcesDrivingLength, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (UnconstrainedPolyEdgeDragMovesBothVertices, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (ArcCentreDragHoldsEndpoints, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditHoldsAFixedPositionAnchor, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditMovesAFreeEndWhileHoldingAFixedStart, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditStillMovesAFreeNeighborOfAFixedPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditRefusesCarryingAFixedPoint, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditKeepsASatisfiedRelationBesideAStaleOne, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditDoesNotEnforceAStaleRelation, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditRelaxesUncommandedAnchorOfDeformedShape, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditPullsAnUnselectedNeighborAlong, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditCarriesSpannedClusterWhole, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditRefusesCommandTiedToLockedNeighbor, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditCarriesALockedShapeUnderTheOverride, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditCarriesABoundDimension, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditRelaxesOnlyBoundPolygonVertices, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditResultDoesNotDependOnThePath, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditLeavesAPreBrokenClusterAlone, DRAG_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (BlockEditWithNoModelledCommandWritesNothing, DRAG_FIXTURE)
 
 BOOST_AUTO_TEST_CASE (BlockEditHonoursEveryEnumeratedAnchor)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

◆ BOOST_AUTO_TEST_CASE() [2/2]

◆ BOOST_FIXTURE_TEST_CASE() [1/57]

BOOST_FIXTURE_TEST_CASE ( ArcCentreDragHoldsEndpoints ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [2/57]

BOOST_FIXTURE_TEST_CASE ( ArcEndpointDragHoldsCircleAndFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [3/57]

BOOST_FIXTURE_TEST_CASE ( ArcEndpointDragYieldsToFixedRadius ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [4/57]

◆ BOOST_FIXTURE_TEST_CASE() [5/57]

BOOST_FIXTURE_TEST_CASE ( BlockEditCarriesALockedShapeUnderTheOverride ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [6/57]

◆ BOOST_FIXTURE_TEST_CASE() [7/57]

◆ BOOST_FIXTURE_TEST_CASE() [8/57]

◆ BOOST_FIXTURE_TEST_CASE() [9/57]

◆ BOOST_FIXTURE_TEST_CASE() [10/57]

◆ BOOST_FIXTURE_TEST_CASE() [11/57]

◆ BOOST_FIXTURE_TEST_CASE() [12/57]

◆ BOOST_FIXTURE_TEST_CASE() [13/57]

◆ BOOST_FIXTURE_TEST_CASE() [14/57]

◆ BOOST_FIXTURE_TEST_CASE() [15/57]

◆ BOOST_FIXTURE_TEST_CASE() [16/57]

◆ BOOST_FIXTURE_TEST_CASE() [17/57]

◆ BOOST_FIXTURE_TEST_CASE() [18/57]

◆ BOOST_FIXTURE_TEST_CASE() [19/57]

◆ BOOST_FIXTURE_TEST_CASE() [20/57]

BOOST_FIXTURE_TEST_CASE ( ClampedRectCornerDragSolvesToClampedCorner ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [21/57]

◆ BOOST_FIXTURE_TEST_CASE() [22/57]

BOOST_FIXTURE_TEST_CASE ( DragCircleCentreMovesConcentricNeighbor ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [23/57]

◆ BOOST_FIXTURE_TEST_CASE() [24/57]

BOOST_FIXTURE_TEST_CASE ( DragReDerivesNeighborRevertRestores ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [25/57]

BOOST_FIXTURE_TEST_CASE ( FixedLengthDragOffCircleHoldsFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [26/57]

BOOST_FIXTURE_TEST_CASE ( FixedLengthDragPinsFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [27/57]

BOOST_FIXTURE_TEST_CASE ( MoveCommitEqualsLastPaintedPreview ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [28/57]

BOOST_FIXTURE_TEST_CASE ( MoveEmptyShapesStagesNoNeighbor ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [29/57]

◆ BOOST_FIXTURE_TEST_CASE() [30/57]

BOOST_FIXTURE_TEST_CASE ( MoveReSolveStagesNeighborsRevertRestores ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [31/57]

◆ BOOST_FIXTURE_TEST_CASE() [32/57]

◆ BOOST_FIXTURE_TEST_CASE() [33/57]

◆ BOOST_FIXTURE_TEST_CASE() [34/57]

◆ BOOST_FIXTURE_TEST_CASE() [35/57]

BOOST_FIXTURE_TEST_CASE ( PersistentDragSessionRejectsInexactSnapTarget ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [36/57]

◆ BOOST_FIXTURE_TEST_CASE() [37/57]

◆ BOOST_FIXTURE_TEST_CASE() [38/57]

◆ BOOST_FIXTURE_TEST_CASE() [39/57]

◆ BOOST_FIXTURE_TEST_CASE() [40/57]

◆ BOOST_FIXTURE_TEST_CASE() [41/57]

◆ BOOST_FIXTURE_TEST_CASE() [42/57]

◆ BOOST_FIXTURE_TEST_CASE() [43/57]

◆ BOOST_FIXTURE_TEST_CASE() [44/57]

BOOST_FIXTURE_TEST_CASE ( PolyEdgeDragEnforcesDrivingLength ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [45/57]

BOOST_FIXTURE_TEST_CASE ( PolyVertexDragHoldsOtherVertices ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [46/57]

BOOST_FIXTURE_TEST_CASE ( RectCornerDragHoldsOppositeCorner ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [47/57]

BOOST_FIXTURE_TEST_CASE ( RectCornerDragMapsThenSolves ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [48/57]

◆ BOOST_FIXTURE_TEST_CASE() [49/57]

BOOST_FIXTURE_TEST_CASE ( RectSideDragOffConstrainedAxisResizes ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [50/57]

BOOST_FIXTURE_TEST_CASE ( RigidTranslationPreservesRoundShapeRadii ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [51/57]

BOOST_FIXTURE_TEST_CASE ( UnconstrainedPolyEdgeDragMovesBothVertices ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [52/57]

BOOST_FIXTURE_TEST_CASE ( UnconstrainedRectSideDragResizesExactly ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [53/57]

BOOST_FIXTURE_TEST_CASE ( UnsolvableClusterLeavesNeighborUntouched ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [54/57]

◆ BOOST_FIXTURE_TEST_CASE() [55/57]

BOOST_FIXTURE_TEST_CASE ( VertexForRectCornerMapsCanonicalIndex ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [56/57]

◆ BOOST_FIXTURE_TEST_CASE() [57/57]