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_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 (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)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( UnbuiltMoveSessionRejectsCandidates )

◆ BOOST_FIXTURE_TEST_CASE() [1/36]

BOOST_FIXTURE_TEST_CASE ( ArcCentreDragHoldsEndpoints ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [2/36]

BOOST_FIXTURE_TEST_CASE ( ArcEndpointDragHoldsCircleAndFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [3/36]

BOOST_FIXTURE_TEST_CASE ( ArcEndpointDragYieldsToFixedRadius ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [4/36]

BOOST_FIXTURE_TEST_CASE ( ClampedRectCornerDragSolvesToClampedCorner ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [5/36]

BOOST_FIXTURE_TEST_CASE ( DeleteShapeLeavesConstraintInErrorState ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [6/36]

BOOST_FIXTURE_TEST_CASE ( DragCircleCentreMovesConcentricNeighbor ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [7/36]

BOOST_FIXTURE_TEST_CASE ( DragReDerivesNeighborRevertRestores ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [8/36]

BOOST_FIXTURE_TEST_CASE ( FixedLengthDragOffCircleHoldsFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [9/36]

BOOST_FIXTURE_TEST_CASE ( FixedLengthDragPinsFarEnd ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [10/36]

BOOST_FIXTURE_TEST_CASE ( MoveCommitEqualsLastPaintedPreview ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [11/36]

BOOST_FIXTURE_TEST_CASE ( MoveEmptyShapesStagesNoNeighbor ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [12/36]

◆ BOOST_FIXTURE_TEST_CASE() [13/36]

BOOST_FIXTURE_TEST_CASE ( MoveReSolveStagesNeighborsRevertRestores ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [14/36]

◆ BOOST_FIXTURE_TEST_CASE() [15/36]

◆ BOOST_FIXTURE_TEST_CASE() [16/36]

◆ BOOST_FIXTURE_TEST_CASE() [17/36]

BOOST_FIXTURE_TEST_CASE ( PersistentDragSessionRejectsInexactSnapTarget ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [18/36]

◆ BOOST_FIXTURE_TEST_CASE() [19/36]

◆ BOOST_FIXTURE_TEST_CASE() [20/36]

BOOST_FIXTURE_TEST_CASE ( PersistentMoveSessionFallsBackAfterRejectedObject ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [21/36]

◆ BOOST_FIXTURE_TEST_CASE() [22/36]

◆ BOOST_FIXTURE_TEST_CASE() [23/36]

◆ BOOST_FIXTURE_TEST_CASE() [24/36]

BOOST_FIXTURE_TEST_CASE ( PersistentMoveSessionReportsEachAcceptedSnapOnce ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [25/36]

BOOST_FIXTURE_TEST_CASE ( PolyEdgeDragEnforcesDrivingLength ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [26/36]

BOOST_FIXTURE_TEST_CASE ( PolyVertexDragHoldsOtherVertices ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [27/36]

BOOST_FIXTURE_TEST_CASE ( RectCornerDragHoldsOppositeCorner ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [28/36]

BOOST_FIXTURE_TEST_CASE ( RectCornerDragMapsThenSolves ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [29/36]

◆ BOOST_FIXTURE_TEST_CASE() [30/36]

BOOST_FIXTURE_TEST_CASE ( RectSideDragOffConstrainedAxisResizes ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [31/36]

BOOST_FIXTURE_TEST_CASE ( RigidTranslationPreservesRoundShapeRadii ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [32/36]

BOOST_FIXTURE_TEST_CASE ( UnconstrainedPolyEdgeDragMovesBothVertices ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [33/36]

BOOST_FIXTURE_TEST_CASE ( UnconstrainedRectSideDragResizesExactly ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [34/36]

BOOST_FIXTURE_TEST_CASE ( UnsolvableClusterLeavesNeighborUntouched ,
DRAG_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [35/36]

◆ BOOST_FIXTURE_TEST_CASE() [36/36]

BOOST_FIXTURE_TEST_CASE ( VertexForRectCornerMapsCanonicalIndex ,
DRAG_FIXTURE  )