|
KiCad PCB EDA Suite
|
Unit tests for the constraint-panel display label (issue #2329 UI redesign): a valueless constraint reads as its type name, a driving valued constraint appends its value in the requested display units, and a reference (non-driving) value is parenthesized. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <climits>#include <set>#include <base_units.h>#include <eda_units.h>#include <pcb_shape.h>#include <constraints/pcb_constraint.h>#include <constraints/constraint_builder.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (ValuelessConstraintIsTypeNameOnly) | |
| BOOST_AUTO_TEST_CASE (DrivingLengthShowsValueInDisplayUnits) | |
| BOOST_AUTO_TEST_CASE (ReferenceValueIsParenthesized) | |
| BOOST_AUTO_TEST_CASE (AngularValueShownInDegrees) | |
| BOOST_AUTO_TEST_CASE (VertexMemberOnRectangleReadsCorner) | |
| BOOST_AUTO_TEST_CASE (VertexMemberOnPolygonReadsVertex) | |
| BOOST_AUTO_TEST_CASE (VertexMemberIndexAtIntMaxDoesNotOverflow) | |
| BOOST_AUTO_TEST_CASE (NonVertexMemberLabelUnchanged) | |
| BOOST_AUTO_TEST_CASE (TypeGlyphIsSingleCodepointAndDistinct) | |
| BOOST_AUTO_TEST_CASE (SegmentExposesStartAndEnd) | |
| BOOST_AUTO_TEST_CASE (CircleExposesOnlyCenter) | |
| BOOST_AUTO_TEST_CASE (RectangleExposesIndexedCorners) | |
Unit tests for the constraint-panel display label (issue #2329 UI redesign): a valueless constraint reads as its type name, a driving valued constraint appends its value in the requested display units, and a reference (non-driving) value is parenthesized.
Definition in file test_constraint_labels.cpp.
| BOOST_AUTO_TEST_CASE | ( | AngularValueShownInDegrees | ) |
Definition at line 83 of file test_constraint_labels.cpp.
References ANGULAR_DIMENSION, BOOST_TEST(), ConstraintDisplayLabel(), MM, PCB_CONSTRAINT::SetDriving(), and PCB_CONSTRAINT::SetValue().
| BOOST_AUTO_TEST_CASE | ( | CircleExposesOnlyCenter | ) |
Definition at line 205 of file test_constraint_labels.cpp.
References anchor, CENTER, CIRCLE, circle(), and ConstraintShapeAnchors().
| BOOST_AUTO_TEST_CASE | ( | DrivingLengthShowsValueInDisplayUnits | ) |
Definition at line 52 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintDisplayLabel(), FIXED_LENGTH, INCH, MM, pcbIUScale, PCB_CONSTRAINT::SetDriving(), and PCB_CONSTRAINT::SetValue().
| BOOST_AUTO_TEST_CASE | ( | NonVertexMemberLabelUnchanged | ) |
Definition at line 149 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintMemberLabel(), Edge_Cuts, EDA_ITEM::m_Uuid, SEGMENT, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetStart(), and START.
| BOOST_AUTO_TEST_CASE | ( | RectangleExposesIndexedCorners | ) |
Definition at line 219 of file test_constraint_labels.cpp.
References anchor, BOOST_CHECK_EQUAL(), ConstraintShapeAnchors(), expected, index, RECTANGLE, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), and VERTEX.
| BOOST_AUTO_TEST_CASE | ( | ReferenceValueIsParenthesized | ) |
Definition at line 70 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintDisplayLabel(), FIXED_LENGTH, MM, pcbIUScale, PCB_CONSTRAINT::SetDriving(), and PCB_CONSTRAINT::SetValue().
| BOOST_AUTO_TEST_CASE | ( | SegmentExposesStartAndEnd | ) |
Definition at line 189 of file test_constraint_labels.cpp.
References anchor, BOOST_AUTO_TEST_CASE(), ConstraintShapeAnchors(), END, SEGMENT, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), and START.
| BOOST_AUTO_TEST_CASE | ( | TypeGlyphIsSingleCodepointAndDistinct | ) |
Definition at line 168 of file test_constraint_labels.cpp.
References ARC_ANGLE, BOOST_AUTO_TEST_CASE(), BOOST_TEST(), and ConstraintTypeGlyph().
| BOOST_AUTO_TEST_CASE | ( | ValuelessConstraintIsTypeNameOnly | ) |
Definition at line 43 of file test_constraint_labels.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_TEST(), ConstraintDisplayLabel(), PCB_CONSTRAINT::HasValue(), MM, and PARALLEL.
| BOOST_AUTO_TEST_CASE | ( | VertexMemberIndexAtIntMaxDoesNotOverflow | ) |
Definition at line 124 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintMemberLabel(), Edge_Cuts, EDA_ITEM::m_Uuid, POLY, RECTANGLE, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), EDA_SHAPE::SetPolyPoints(), PCB_SHAPE::SetStart(), and VERTEX.
| BOOST_AUTO_TEST_CASE | ( | VertexMemberOnPolygonReadsVertex | ) |
Definition at line 111 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintMemberLabel(), Edge_Cuts, EDA_ITEM::m_Uuid, POLY, PCB_SHAPE::SetLayer(), EDA_SHAPE::SetPolyPoints(), and VERTEX.
| BOOST_AUTO_TEST_CASE | ( | VertexMemberOnRectangleReadsCorner | ) |
Definition at line 96 of file test_constraint_labels.cpp.
References BOOST_TEST(), ConstraintMemberLabel(), Edge_Cuts, EDA_ITEM::m_Uuid, RECTANGLE, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetStart(), and VERTEX.