KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_api_proto.cpp File Reference
#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)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( FootprintExcludeFromSimulationRoundTrip )

◆ BOOST_AUTO_TEST_CASE() [2/2]

◆ BOOST_FIXTURE_TEST_CASE() [1/5]

◆ BOOST_FIXTURE_TEST_CASE() [2/5]

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() [3/5]

◆ BOOST_FIXTURE_TEST_CASE() [4/5]

BOOST_FIXTURE_TEST_CASE ( EmbeddedFiles ,
PROTO_TEST_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [5/5]

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().