KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_api_proto.cpp File Reference
#include <boost/test/unit_test.hpp>
#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 <board.h>
#include <footprint.h>
#include <pcb_barcode.h>
#include <pcb_dimension.h>
#include <pcb_reference_image.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_FIXTURE_TEST_CASE (Padstacks, PROTO_TEST_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (CopperThievingZoneRoundTrip, PROTO_TEST_FIXTURE)
 Round-trip a copper-thieving zone through the protobuf API.
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

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 174 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/3]

BOOST_FIXTURE_TEST_CASE ( Padstacks ,
PROTO_TEST_FIXTURE  )

Definition at line 143 of file test_api_proto.cpp.

References KI_TEST::LoadBoard(), PCB_VIA_T, and testProtoFromKiCadObject().