|
KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>#include <tool/edit_points.h>#include <tool/edit_relations.h>#include <tool/grid_helper.h>#include <tool/point_editor_behavior.h>#include <commit.h>#include <eda_shape.h>#include <geometry/shape_poly_set.h>Go to the source code of this file.
Classes | |
| class | POLY_SHAPE_MOCK |
| class | POLY_EDIT_COMMIT |
Functions | |
| BOOST_AUTO_TEST_CASE (PointRelationsExposeTypedSemantics) | |
| BOOST_AUTO_TEST_CASE (PerpendicularLinePreservesDirection) | |
| BOOST_AUTO_TEST_CASE (PolygonFixedLengthPreservesEndpoints) | |
| BOOST_AUTO_TEST_CASE (PolygonConvergenceClampsAtAdjacentIntersection) | |
| BOOST_AUTO_TEST_CASE (TriangleEdgeDragPassesThroughTheCollapsePoint) | |
| BOOST_AUTO_TEST_CASE (TriangularHoleEdgeDragKeepsItsCorners) | |
| BOOST_AUTO_TEST_CASE (CollapsedPolygonKeepsItsCorners) | |
| BOOST_AUTO_TEST_CASE | ( | CollapsedPolygonKeepsItsCorners | ) |
| BOOST_AUTO_TEST_CASE | ( | PerpendicularLinePreservesDirection | ) |
Definition at line 50 of file test_edit_relations.cpp.
References std::abs(), EDIT_LINE::ApplyRelation(), BOOST_CHECK_EQUAL(), end, EDIT_POINT::GetPosition(), EDIT_POINT::GetX(), EDIT_POINT::GetY(), grid, EDIT_RELATION::PerpendicularTranslation(), EDIT_LINE::SetPosition(), and EDIT_LINE::SetRelation().
| BOOST_AUTO_TEST_CASE | ( | PointRelationsExposeTypedSemantics | ) |
Definition at line 34 of file test_edit_relations.cpp.
References EDIT_POINT::ApplyRelation(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), EDIT_POINT::GetPosition(), EDIT_POINT::GetRelation(), grid, EDIT_RELATION::Kind(), SAME_X, EDIT_RELATION::SameX(), and EDIT_POINT::SetRelation().
| BOOST_AUTO_TEST_CASE | ( | PolygonConvergenceClampsAtAdjacentIntersection | ) |
Definition at line 94 of file test_edit_relations.cpp.
References EDIT_POINTS::AddLine(), EDIT_POINTS::AddPoint(), EDIT_LINE::ApplyRelation(), BOOST_CHECK_EQUAL(), EDIT_LINE::GetEnd(), EDIT_LINE::GetOrigin(), EDIT_POINT::GetPosition(), grid, EDIT_POINTS::Line(), EDIT_POINTS::Point(), EDIT_LINE::SetDragPolicy(), and EDIT_LINE::SetPosition().
| BOOST_AUTO_TEST_CASE | ( | PolygonFixedLengthPreservesEndpoints | ) |
Definition at line 68 of file test_edit_relations.cpp.
References EDIT_POINTS::AddLine(), EDIT_POINTS::AddPoint(), EDIT_LINE::ApplyRelation(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FIXED_LENGTH, EDIT_LINE::GetDragPolicy(), EDIT_LINE::GetEnd(), POLYGON_EDGE_DRAG_POLICY::GetMode(), EDIT_LINE::GetOrigin(), EDIT_POINT::GetPosition(), EDIT_POINT::GetY(), grid, EDIT_POINTS::Line(), EDIT_POINTS::Point(), EDIT_LINE::SetDragPolicy(), and EDIT_LINE::SetPosition().
| BOOST_AUTO_TEST_CASE | ( | TriangleEdgeDragPassesThroughTheCollapsePoint | ) |
Definition at line 118 of file test_edit_relations.cpp.
References EDIT_POINTS::AddLine(), EDIT_POINTS::AddPoint(), EDIT_LINE::ApplyRelation(), BOOST_CHECK_EQUAL(), EDIT_LINE::GetEnd(), EDIT_LINE::GetOrigin(), EDIT_POINT::GetPosition(), grid, EDIT_POINTS::Line(), EDIT_POINTS::Point(), EDIT_LINE::SetDragPolicy(), and EDIT_LINE::SetPosition().
| BOOST_AUTO_TEST_CASE | ( | TriangularHoleEdgeDragKeepsItsCorners | ) |
Definition at line 140 of file test_edit_relations.cpp.
References SHAPE_POLY_SET::Append(), EDIT_LINE::ApplyRelation(), BOOST_CHECK_EQUAL(), POLYGON_POINT_EDIT_BEHAVIOR::BuildForPolyOutline(), EDIT_LINE::GetEnd(), EDIT_LINE::GetOrigin(), EDIT_POINT::GetPosition(), grid, EDIT_POINTS::Line(), SHAPE_POLY_SET::NewHole(), SHAPE_POLY_SET::NewOutline(), EDIT_LINE::SetDragPolicy(), and EDIT_LINE::SetPosition().