|
KiCad PCB EDA Suite
|
#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) | |
| BOOST_AUTO_TEST_CASE | ( | BlockEditHonoursEveryEnumeratedAnchor | ) |
Definition at line 2114 of file test_constraint_drag.cpp.
References BOARD::Add(), BOARD_CONSTRAINT_ADAPTER::Apply(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD_CONSTRAINT_ADAPTER::Build(), ConstraintShapeAnchors(), EDA_ITEM::m_Uuid, MM, POLY, RECTANGLE, result, PCB_SHAPE::SetEnd(), EDA_SHAPE::SetPolyPoints(), PCB_SHAPE::SetStart(), BOARD_CONSTRAINT_ADAPTER::SolveBlockEdit(), and SOLVED.
| BOOST_AUTO_TEST_CASE | ( | UnbuiltMoveSessionRejectsCandidates | ) |
Definition at line 351 of file test_constraint_drag.cpp.
References BOOST_CHECK(), INCOMPATIBLE, INTRINSIC_ANCHOR, OBJECT, SNAP_CANDIDATE::Point(), BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), result, and SNAP_SOURCE_CONTEXT::sourcePoint.
| BOOST_FIXTURE_TEST_CASE | ( | ArcCentreDragHoldsEndpoints | , |
| DRAG_FIXTURE | ) |
Definition at line 1481 of file test_constraint_drag.cpp.
References std::abs(), addSegment(), BOOST_CHECK(), CENTER, END, PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), SolveCluster(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | ArcEndpointDragHoldsCircleAndFarEnd | , |
| DRAG_FIXTURE | ) |
Definition at line 994 of file test_constraint_drag.cpp.
References std::abs(), addSegment(), BOOST_CHECK(), END, PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), SolveCluster(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | ArcEndpointDragYieldsToFixedRadius | , |
| DRAG_FIXTURE | ) |
Definition at line 1020 of file test_constraint_drag.cpp.
References std::abs(), BOARD::Add(), FIXED_RADIUS, EDA_SHAPE::GetRadius(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), SolveCluster(), START, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditCarriesABoundDimension | , |
| DRAG_FIXTURE | ) |
Definition at line 1914 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), COINCIDENT, delta, END, EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), PCB_DIM_ALIGNED_T, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetEnd(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditCarriesALockedShapeUnderTheOverride | , |
| DRAG_FIXTURE | ) |
Definition at line 1880 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, locked, MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditCarriesSpannedClusterWhole | , |
| DRAG_FIXTURE | ) |
Definition at line 1804 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), PCB_SHAPE::Move(), moved, result, BOARD_COMMIT::Revert(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditDoesNotEnforceAStaleRelation | , |
| DRAG_FIXTURE | ) |
Definition at line 1680 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), END, EDA_SHAPE::GetEnd(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, REFUSED, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetEnd(), and BOARD_CONSTRAINT_BLOCK_SESSION::Solve().
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditHoldsAFixedPositionAnchor | , |
| DRAG_FIXTURE | ) |
Definition at line 1508 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetStart(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditKeepsASatisfiedRelationBesideAStaleOne | , |
| DRAG_FIXTURE | ) |
Definition at line 1641 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), BOARD_CONSTRAINT_SESSION::HasBaseConflict(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, NOT_MODELED, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetEnd(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), START, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditLeavesAPreBrokenClusterAlone | , |
| DRAG_FIXTURE | ) |
Definition at line 2062 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), END, BOARD_CONSTRAINT_SESSION::HasBaseConflict(), EDA_ITEM::m_Uuid, MM, moved, REFUSED, result, BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditMovesAFreeEndWhileHoldingAFixedStart | , |
| DRAG_FIXTURE | ) |
Definition at line 1540 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditPullsAnUnselectedNeighborAlong | , |
| DRAG_FIXTURE | ) |
Definition at line 1760 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), END, EDA_SHAPE::GetEnd(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetEnd(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditRefusesCarryingAFixedPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 1611 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), PCB_SHAPE::Move(), moved, REFUSED, result, BOARD_COMMIT::Revert(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditRefusesCommandTiedToLockedNeighbor | , |
| DRAG_FIXTURE | ) |
Definition at line 1842 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), PCB_SHAPE::Move(), moved, REFUSED, result, BOARD_COMMIT::Revert(), BOARD_ITEM::SetLocked(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditRelaxesOnlyBoundPolygonVertices | , |
| DRAG_FIXTURE | ) |
Definition at line 1958 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), COINCIDENT, SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::CPoint(), delta, EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), PCB_SHAPE::Move(), moved, SHAPE_LINE_CHAIN::PointCount(), result, BOARD_COMMIT::Revert(), EDA_SHAPE::SetPolyPoints(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, START, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditRelaxesUncommandedAnchorOfDeformedShape | , |
| DRAG_FIXTURE | ) |
Definition at line 1713 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), PCB_SHAPE::SetStart(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditResultDoesNotDependOnThePath | , |
| DRAG_FIXTURE | ) |
Definition at line 2011 of file test_constraint_drag.cpp.
References BOARD::Add(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), delta, END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, path, PERPENDICULAR, result, SEGMENT, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, square(), and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditStillMovesAFreeNeighborOfAFixedPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 1575 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_BLOCK_SESSION::Build(), END, EDA_SHAPE::GetStart(), MM, COMMIT::Modify(), moved, result, BOARD_COMMIT::Revert(), BOARD_CONSTRAINT_BLOCK_SESSION::Solve(), SOLVED, and START.
| BOOST_FIXTURE_TEST_CASE | ( | BlockEditWithNoModelledCommandWritesNothing | , |
| DRAG_FIXTURE | ) |
Definition at line 2085 of file test_constraint_drag.cpp.
References addSegment(), BOARD_CONSTRAINT_ADAPTER::Apply(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_ADAPTER::Build(), CENTER, END, EDA_SHAPE::GetEnd(), EDA_ITEM::m_Uuid, MM, NOT_MODELED, result, BOARD_CONSTRAINT_ADAPTER::SolveBlockEdit(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | ClampedRectCornerDragSolvesToClampedCorner | , |
| DRAG_FIXTURE | ) |
Definition at line 1222 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_REQUIRE(), COINCIDENT, ConstraintShapeVertex(), MM, COMMIT::Modify(), rect(), SolveCluster(), START, VERTEX, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | DeleteShapeLeavesConstraintInErrorState | , |
| DRAG_FIXTURE | ) |
Definition at line 769 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_REQUIRE_EQUAL(), COINCIDENT, BOARD::Constraints(), END, PCB_CONSTRAINT::GetMembers(), EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Push(), COMMIT::Remove(), BOARD::ResolveItem(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | DragCircleCentreMovesConcentricNeighbor | , |
| DRAG_FIXTURE | ) |
Definition at line 713 of file test_constraint_drag.cpp.
References BOARD::Add(), BOOST_CHECK(), CENTER, CONCENTRIC, PCB_SHAPE::GetCenter(), EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Revert(), and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | DragFreeCornerBesideFixedPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 636 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), CONSTRAINT_DIAGNOSIS::conflicting, END, FIXED_POSITION, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), BOARD_CONSTRAINT_SESSION::HasBaseConflict(), EDA_ITEM::m_Uuid, MM, right, BOARD_CONSTRAINT_DRAG_SESSION::Solve(), CONSTRAINT_DIAGNOSIS::solved, and START.
| BOOST_FIXTURE_TEST_CASE | ( | DragReDerivesNeighborRevertRestores | , |
| DRAG_FIXTURE | ) |
Definition at line 169 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), COINCIDENT, END, EDA_SHAPE::GetEnd(), EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Revert(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | FixedLengthDragOffCircleHoldsFarEnd | , |
| DRAG_FIXTURE | ) |
Definition at line 967 of file test_constraint_drag.cpp.
References std::abs(), BOARD::Add(), addSegment(), END, FIXED_LENGTH, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Revert(), and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | FixedLengthDragPinsFarEnd | , |
| DRAG_FIXTURE | ) |
Definition at line 936 of file test_constraint_drag.cpp.
References std::abs(), BOARD::Add(), addSegment(), END, FIXED_LENGTH, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Revert(), and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | MoveCommitEqualsLastPaintedPreview | , |
| DRAG_FIXTURE | ) |
Definition at line 878 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK_EQUAL_COLLECTIONS(), END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), MM, COMMIT::Modify(), PCB_SHAPE::Move(), BOARD_COMMIT::Push(), ReSolveShapeClusters(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | MoveEmptyShapesStagesNoNeighbor | , |
| DRAG_FIXTURE | ) |
Definition at line 910 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), COMMIT::Empty(), END, MM, ReSolveShapeClusters(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | MoveReSolvesCluster | , |
| DRAG_FIXTURE | ) |
Definition at line 807 of file test_constraint_drag.cpp.
References std::abs(), BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), END, FIXED_POSITION, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, POINT_ON_LINE, ReSolveShapeClusters(), START, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | MoveReSolveStagesNeighborsRevertRestores | , |
| DRAG_FIXTURE | ) |
Definition at line 842 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), END, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), MM, COMMIT::Modify(), PCB_SHAPE::Move(), ReSolveShapeClusters(), BOARD_COMMIT::Revert(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | PartialClusterMoveBesideFixedPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 688 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), END, FIXED_POSITION, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, moved, right, BOARD_CONSTRAINT_MOVE_SESSION::Solve(), and START.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentDragSessionExactifiesEqualGapTarget | , |
| DRAG_FIXTURE | ) |
Definition at line 261 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), SNAP_CANDIDATE::AxisX(), BBOX_EQUAL_GAP, BBOX_LAYOUT, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), END, EQUAL_GAP_X, FIXED_LENGTH, EDA_SHAPE::GetEnd(), HORIZONTAL, EDA_ITEM::m_Uuid, MM, OBJECT, SNAP_CANDIDATE::relation, BOARD_CONSTRAINT_DRAG_SESSION::ResolveCandidates(), result, SNAP_SOURCE_CONTEXT::sourcePoint, SUCCESS, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentDragSessionFindsJointlyFeasibleManifoldPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 525 of file test_constraint_drag.cpp.
References std::abs(), BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), SNAP_CANDIDATE::direction, END, FINITE_MANIFOLD, EDA_SHAPE::GetEnd(), HORIZONTAL, INCOMPATIBLE, SNAP_CANDIDATE::Line(), EDA_ITEM::m_Uuid, MM, OBJECT, SNAP_CANDIDATE::origin, BOARD_CONSTRAINT_DRAG_SESSION::ResolveCandidates(), result, SNAP_SOURCE_CONTEXT::sourcePoint, SNAP_RESULT::status, SUCCESS, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentDragSessionPreservesGeometryOnBaseConflict | , |
| DRAG_FIXTURE | ) |
Definition at line 555 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), END, FIXED_LENGTH, EDA_SHAPE::GetEnd(), BOARD_CONSTRAINT_DRAG_SESSION::IsExactFeasible(), EDA_ITEM::m_Uuid, MM, PCB_SHAPE::SetEnd(), BOARD_CONSTRAINT_DRAG_SESSION::Solve(), CONSTRAINT_DIAGNOSIS::solved, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentDragSessionRejectsInexactSnapTarget | , |
| DRAG_FIXTURE | ) |
Definition at line 243 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), END, FIXED_LENGTH, EDA_SHAPE::GetEnd(), BOARD_CONSTRAINT_DRAG_SESSION::IsExactFeasible(), EDA_ITEM::m_Uuid, MM, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentDragSessionWarmStartsSuccessivePreviewFrames | , |
| DRAG_FIXTURE | ) |
Definition at line 199 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_DRAG_SESSION::Build(), END, EDA_SHAPE::GetEnd(), EDA_ITEM::m_Uuid, BOARD_CONSTRAINT_DRAG_SESSION::Matches(), MM, COMMIT::Modify(), BOARD_COMMIT::Revert(), BOARD_CONSTRAINT_DRAG_SESSION::Solve(), CONSTRAINT_DIAGNOSIS::solved, and START.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionArbitratesBeforeApplying | , |
| DRAG_FIXTURE | ) |
Definition at line 292 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), END, INTRINSIC_ANCHOR, MM, moved, OBJECT, SNAP_CANDIDATE::Point(), BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), result, BOARD_CONSTRAINT_MOVE_SESSION::Solve(), SNAP_SOURCE_CONTEXT::sourcePoint, START, and SUCCESS.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionFallsBackAfterRejectedObject | , |
| DRAG_FIXTURE | ) |
Definition at line 386 of file test_constraint_drag.cpp.
References SNAP_RESOLVER::AddCandidate(), addSegment(), SNAP_CANDIDATE::AxisX(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), END, GRID, GRID_AXIS, GRID_X, INTRINSIC_ANCHOR, locked, MM, moved, OBJECT, SNAP_CANDIDATE::Point(), SNAP_RESOLVER::Resolve(), result, SNAP_RESOLVER::SetClock(), SNAP_RESOLVER::SetFeasibilityCallback(), SNAP_SOURCE_CONTEXT::sourcePoint, START, and SUCCESS.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionJointlySolvesAuthoredAndObjectManifolds | , |
| DRAG_FIXTURE | ) |
Definition at line 461 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), FINITE_MANIFOLD, SNAP_CANDIDATE::Line(), MM, moved, OBJECT, POINT_ON_LINE, BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), result, BOARD_ITEM::SetLocked(), SNAP_SOURCE_CONTEXT::sourcePoint, START, SUCCESS, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionJointlySolvesDisconnectedClusters | , |
| DRAG_FIXTURE | ) |
Definition at line 494 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), EDA_ITEM::m_Uuid, MM, POINT_ON_LINE, BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), result, BOARD_ITEM::SetLocked(), SNAP_SOURCE_CONTEXT::sourcePoint, START, SUCCESS, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionRejectsIncompatibleTarget | , |
| DRAG_FIXTURE | ) |
Definition at line 365 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), END, INCOMPATIBLE, INTRINSIC_ANCHOR, locked, MM, moved, OBJECT, SNAP_CANDIDATE::Point(), BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), SNAP_SOURCE_CONTEXT::sourcePoint, START, and SNAP_RESULT::status.
| BOOST_FIXTURE_TEST_CASE | ( | PersistentMoveSessionReportsEachAcceptedSnapOnce | , |
| DRAG_FIXTURE | ) |
Definition at line 428 of file test_constraint_drag.cpp.
References SNAP_RESOLVER::AddCandidate(), addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), END, SNAP_CANDIDATE::guides, INTRINSIC_ANCHOR, MM, moved, OBJECT, SNAP_CANDIDATE::Point(), SNAP_RESOLVER::Resolve(), result, SNAP_RESOLVER::SetFeasibilityCallback(), SNAP_SOURCE_CONTEXT::sourcePoint, START, and SUCCESS.
| BOOST_FIXTURE_TEST_CASE | ( | PinnedClusterStaysSnappableAtRest | , |
| DRAG_FIXTURE | ) |
Definition at line 664 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), END, FIXED_POSITION, EDA_ITEM::m_Uuid, MM, BOARD_CONSTRAINT_MOVE_SESSION::ResolveCandidates(), result, right, SNAP_SOURCE_CONTEXT::sourcePoint, START, and SUCCESS.
| BOOST_FIXTURE_TEST_CASE | ( | PolyEdgeDragEnforcesDrivingLength | , |
| DRAG_FIXTURE | ) |
Definition at line 1391 of file test_constraint_drag.cpp.
References std::abs(), SHAPE_POLY_SET::COutline(), EDA_SHAPE::GetPolyShape(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), EDA_SHAPE::SetPolyPoints(), SolveCluster(), and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | PolyVertexDragHoldsOtherVertices | , |
| DRAG_FIXTURE | ) |
Definition at line 1077 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_REQUIRE_EQUAL(), COINCIDENT, SHAPE_POLY_SET::COutline(), cursor, EDA_SHAPE::GetPolyShape(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), SolveCluster(), START, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | RectCornerDragHoldsOppositeCorner | , |
| DRAG_FIXTURE | ) |
Definition at line 1042 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), COINCIDENT, cursor, MM, COMMIT::Modify(), rect(), SolveCluster(), START, VERTEX, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | RectCornerDragMapsThenSolves | , |
| DRAG_FIXTURE | ) |
Definition at line 1191 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_REQUIRE(), COINCIDENT, ConstraintShapeVertex(), cursor, MM, COMMIT::Modify(), rect(), SolveCluster(), START, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | RectSideDragEnforcesDrivingWidth | , |
| DRAG_FIXTURE | ) |
Definition at line 1288 of file test_constraint_drag.cpp.
References std::abs(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOOST_TEST_MESSAGE(), ConstraintShapeAnchors(), ConstraintShapeVertex(), MM, COMMIT::Modify(), rect(), SolveCluster(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | RectSideDragOffConstrainedAxisResizes | , |
| DRAG_FIXTURE | ) |
Definition at line 1332 of file test_constraint_drag.cpp.
References std::abs(), BOOST_CHECK(), BOOST_REQUIRE(), ConstraintShapeVertex(), MM, COMMIT::Modify(), rect(), SolveCluster(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | RigidTranslationPreservesRoundShapeRadii | , |
| DRAG_FIXTURE | ) |
Definition at line 325 of file test_constraint_drag.cpp.
References BOARD::Add(), BOARD_CONSTRAINT_ADAPTER::Apply(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_ADAPTER::Build(), circle(), ELLIPSE, MM, and BOARD_CONSTRAINT_ADAPTER::SolveRigidTranslation().
| BOOST_FIXTURE_TEST_CASE | ( | UnconstrainedPolyEdgeDragMovesBothVertices | , |
| DRAG_FIXTURE | ) |
Definition at line 1439 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), COINCIDENT, SHAPE_POLY_SET::COutline(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, COMMIT::Modify(), EDA_SHAPE::SetPolyPoints(), SolveCluster(), START, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | UnconstrainedRectSideDragResizesExactly | , |
| DRAG_FIXTURE | ) |
Definition at line 1362 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_REQUIRE(), COINCIDENT, ConstraintShapeVertex(), MM, COMMIT::Modify(), rect(), SolveCluster(), START, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | UnsolvableClusterLeavesNeighborUntouched | , |
| DRAG_FIXTURE | ) |
Definition at line 738 of file test_constraint_drag.cpp.
References BOARD::Add(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), CONCENTRIC, END, EDA_ITEM::m_Uuid, MM, BOARD_COMMIT::Revert(), and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | VertexForPolyMapsOrdinal | , |
| DRAG_FIXTURE | ) |
Definition at line 1148 of file test_constraint_drag.cpp.
References BOARD::Add(), SHAPE_POLY_SET::AddOutline(), SHAPE_LINE_CHAIN::ArcCount(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), chain, ConstraintShapeVertex(), SHAPE_POLY_SET::COutline(), EDA_SHAPE::GetPolyShape(), MM, POLY, and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | VertexForRectCornerMapsCanonicalIndex | , |
| DRAG_FIXTURE | ) |
Definition at line 1114 of file test_constraint_drag.cpp.
References addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), ConstraintShapeVertex(), MM, rect(), and VERTEX.
| BOOST_FIXTURE_TEST_CASE | ( | WholeClusterMoveSurvivesPreExistingConflict | , |
| DRAG_FIXTURE | ) |
Definition at line 578 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), COINCIDENT, END, EDA_SHAPE::GetStart(), HORIZONTAL, EDA_ITEM::m_Uuid, MM, right, BOARD_CONSTRAINT_MOVE_SESSION::Solve(), START, and WHOLE.
| BOOST_FIXTURE_TEST_CASE | ( | WholeClusterMoveWithFixedPoint | , |
| DRAG_FIXTURE | ) |
Definition at line 610 of file test_constraint_drag.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), addSegment(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_CONSTRAINT_MOVE_SESSION::Build(), COINCIDENT, END, FIXED_POSITION, EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, MM, right, BOARD_CONSTRAINT_MOVE_SESSION::Solve(), and START.