|
KiCad PCB EDA Suite
|
Tests reference-value propagation (issue #2329): a non-driving (reference) constraint only measures its quantity, so after a solve its stored value must track the geometry, while a driving constraint's value is an input the solve never overwrites. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <algorithm>#include <cmath>#include <vector>#include <board.h>#include <pcb_shape.h>#include <geometry/seg.h>#include <constraints/pcb_constraint.h>#include <constraints/board_constraint_adapter.h>#include <constraints/constraint_builder.h>#include "constraint_test_utils.h"Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (ReferenceLengthTracksGeometry) | |
| BOOST_AUTO_TEST_CASE (ReferenceTwoPointLengthTracksGeometry) | |
| BOOST_AUTO_TEST_CASE (DrivingLengthValueNotOverwritten) | |
| BOOST_AUTO_TEST_CASE (ReferenceRadiusTracksGeometry) | |
| BOOST_AUTO_TEST_CASE (ReferenceValueUnchangedIsNotStaged) | |
| BOOST_AUTO_TEST_CASE (DrivingObtuseCornerSurvivesSolve) | |
| BOOST_AUTO_TEST_CASE (DrivingChainedCornerCrossesNinety) | |
| BOOST_AUTO_TEST_CASE (ReferenceAngleTracksGeometry) | |
Tests reference-value propagation (issue #2329): a non-driving (reference) constraint only measures its quantity, so after a solve its stored value must track the geometry, while a driving constraint's value is an input the solve never overwrites.
Definition in file test_constraint_reference.cpp.
| BOOST_AUTO_TEST_CASE | ( | DrivingChainedCornerCrossesNinety | ) |
Definition at line 200 of file test_constraint_reference.cpp.
References KI_TEST::addConstraint(), KI_TEST::addSegment(), ANGULAR_DIMENSION, COINCIDENT, END, EDA_ITEM::m_Uuid, KI_TEST::MM, KI_TEST::solveAndApply(), START, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | DrivingLengthValueNotOverwritten | ) |
Definition at line 109 of file test_constraint_reference.cpp.
References std::abs(), KI_TEST::addConstraint(), KI_TEST::addSegment(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), END, FIXED_LENGTH, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, KI_TEST::MM, SolveCluster(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | DrivingObtuseCornerSurvivesSolve | ) |
Definition at line 179 of file test_constraint_reference.cpp.
References KI_TEST::addConstraint(), KI_TEST::addSegment(), ANGULAR_DIMENSION, COINCIDENT, EDA_ITEM::m_Uuid, KI_TEST::MM, KI_TEST::solveAndApply(), START, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ReferenceAngleTracksGeometry | ) |
Definition at line 220 of file test_constraint_reference.cpp.
References KI_TEST::addConstraint(), KI_TEST::addSegment(), ANGULAR_DIMENSION, BOOST_REQUIRE(), EDA_ITEM::m_Uuid, KI_TEST::MM, ReSolveShapeClusters(), PCB_CONSTRAINT::SetDriving(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ReferenceLengthTracksGeometry | ) |
Definition at line 61 of file test_constraint_reference.cpp.
References std::abs(), KI_TEST::addConstraint(), KI_TEST::addSegment(), BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), END, FIXED_LENGTH, EDA_ITEM::m_Uuid, KI_TEST::MM, PCB_CONSTRAINT::SetDriving(), SolveCluster(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ReferenceRadiusTracksGeometry | ) |
Definition at line 133 of file test_constraint_reference.cpp.
References std::abs(), KI_TEST::addCircle(), KI_TEST::addConstraint(), BOOST_REQUIRE(), circle(), FIXED_RADIUS, KI_TEST::MM, ReSolveAfterShapeResize(), PCB_CONSTRAINT::SetDriving(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ReferenceTwoPointLengthTracksGeometry | ) |
Definition at line 84 of file test_constraint_reference.cpp.
References std::abs(), KI_TEST::addConstraint(), KI_TEST::addSegment(), BOOST_REQUIRE(), END, FIXED_LENGTH, EDA_ITEM::m_Uuid, KI_TEST::MM, PCB_CONSTRAINT::SetDriving(), SolveCluster(), and START.
| BOOST_AUTO_TEST_CASE | ( | ReferenceValueUnchangedIsNotStaged | ) |
Definition at line 156 of file test_constraint_reference.cpp.
References KI_TEST::addConstraint(), KI_TEST::addSegment(), BOOST_CHECK_EQUAL(), END, FIXED_LENGTH, EDA_ITEM::m_Uuid, KI_TEST::MM, PCB_CONSTRAINT::SetDriving(), SolveCluster(), and WHOLE.