|
KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>#include <memory>#include <limits>#include <import_export.h>#include <qa_utils/api_test_utils.h>#include <qa_utils/wx_utils/wx_assert.h>#include <pcbnew_utils/board_test_utils.h>#include <settings/settings_manager.h>#include <api/board/board_types.pb.h>#include <api/common/types/embedded_files.pb.h>#include <board.h>#include <embedded_files.h>#include <footprint.h>#include <pcb_barcode.h>#include <pcb_dimension.h>#include <pcb_drill_chart.h>#include <pcb_drill_map.h>#include <pcb_grid_item.h>#include <pcb_reference_image.h>#include <pcb_shape.h>#include <pcb_table.h>#include <pcb_text.h>#include <pcb_textbox.h>#include <pcb_track.h>#include <zone.h>Go to the source code of this file.
Classes | |
| struct | PROTO_TEST_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (BoardTypes, PROTO_TEST_FIXTURE) | |
| BOOST_AUTO_TEST_CASE (FootprintExcludeFromSimulationRoundTrip) | |
| BOOST_FIXTURE_TEST_CASE (DrillChartColumnWidths, PROTO_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (Padstacks, PROTO_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (EmbeddedFiles, PROTO_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (CopperThievingZoneRoundTrip, PROTO_TEST_FIXTURE) | |
| Round-trip a copper-thieving zone through the protobuf API. | |
| BOOST_AUTO_TEST_CASE (GridItems) | |
| BOOST_AUTO_TEST_CASE | ( | FootprintExcludeFromSimulationRoundTrip | ) |
Definition at line 195 of file test_api_proto.cpp.
References FOOTPRINT::SetExcludedFromSim(), and testProtoFromKiCadObject().
| BOOST_AUTO_TEST_CASE | ( | GridItems | ) |
Definition at line 367 of file test_api_proto.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CARTESIAN, DEGREES_T, POLAR, PCB_GRID_ITEM::Serialize(), PCB_GRID_ITEM::SetAffectsCursor(), PCB_GRID_ITEM::SetAffectsPlacement(), PCB_GRID_ITEM::SetAffectsRouting(), PCB_GRID_ITEM::SetAssignedPriority(), PCB_GRID_ITEM::SetExtent(), PCB_GRID_ITEM::SetGridItemType(), BOARD_ITEM::SetLocked(), PCB_GRID_ITEM::SetOrientationDegrees(), PCB_GRID_ITEM::SetPhiExtentDegrees(), PCB_GRID_ITEM::SetPhiSpacingDegrees(), PCB_GRID_ITEM::SetPosition(), PCB_GRID_ITEM::SetRadiusExtent(), PCB_GRID_ITEM::SetRadiusSpacing(), PCB_GRID_ITEM::SetSpacing(), PCB_GRID_ITEM::SetTickInterval(), and testProtoFromKiCadObject().
| BOOST_FIXTURE_TEST_CASE | ( | BoardTypes | , |
| PROTO_TEST_FIXTURE | ) |
Definition at line 62 of file test_api_proto.cpp.
References KI_TEST::LoadBoard(), PCB_ARC_T, PCB_BARCODE_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_DRILL_CHART_T, PCB_DRILL_MAP_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, and testProtoFromKiCadObject().
| BOOST_FIXTURE_TEST_CASE | ( | CopperThievingZoneRoundTrip | , |
| PROTO_TEST_FIXTURE | ) |
Round-trip a copper-thieving zone through the protobuf API.
The shared testProtoFromKiCadObject helper relies on ZONE::operator==, which by existing precedent does not compare fill-mode or hatch/thieving fields, so we hand-check every thieving field plus the netless invariant.
Definition at line 318 of file test_api_proto.cpp.
References ZONE::AppendCorner(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), COPPER_THIEVING, DEGREES_T, THIEVING_SETTINGS::element_size, F_Cu, THIEVING_SETTINGS::gap, THIEVING_SETTINGS::line_width, THIEVING_SETTINGS::orientation, THIEVING_SETTINGS::pattern, pcbIUScale, ZONE::Serialize(), ZONE::SetFillMode(), ZONE::SetLayer(), ZONE::SetThievingSettings(), SQUARES, and THIEVING_SETTINGS::stagger.
| BOOST_FIXTURE_TEST_CASE | ( | DrillChartColumnWidths | , |
| PROTO_TEST_FIXTURE | ) |
Definition at line 206 of file test_api_proto.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PCB_DRILL_CHART::Columns(), PCB_DRILL_CHART::Deserialize(), DRILL_CHART_MAX_COLUMN_WIDTH, KI_TEST::LoadBoard(), PCB_DRILL_CHART_T, and PCB_DRILL_CHART::Serialize().
| BOOST_FIXTURE_TEST_CASE | ( | EmbeddedFiles | , |
| PROTO_TEST_FIXTURE | ) |
Definition at line 274 of file test_api_proto.cpp.
References actual, BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), expected, KI_TEST::LoadBoard(), and name.
| BOOST_FIXTURE_TEST_CASE | ( | Padstacks | , |
| PROTO_TEST_FIXTURE | ) |
Definition at line 252 of file test_api_proto.cpp.
References KI_TEST::LoadBoard(), PCB_VIA_T, and testProtoFromKiCadObject().