KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_array_pad_name_provider.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <array_pad_number_provider.h>
#include <common.h>
#include <footprint.h>
#include <pad.h>

Go to the source code of this file.

Classes

struct  APNP_CASE
 Declare the test suite. More...
 

Functions

static std::unique_ptr< FOOTPRINTFootprintWithPads (const std::vector< wxString > aNames)
 Make a footprint with a given list of named pads.
 
std::vector< APNP_CASEGetFootprintAPNPCases ()
 Get Array Pad Name Provider cases when a footprint is looked at to determine what names are available.
 
void CheckPadNumberProvider (ARRAY_PAD_NUMBER_PROVIDER &aProvider, std::vector< wxString > aExpectedNumbers)
 Check that an ARRAY_PAD_NUMBER_PROVIDER provides the right names.
 
 BOOST_AUTO_TEST_CASE (FootprintCases)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( FootprintCases  )

◆ CheckPadNumberProvider()

void CheckPadNumberProvider ( ARRAY_PAD_NUMBER_PROVIDER aProvider,
std::vector< wxString >  aExpectedNumbers 
)

Check that an ARRAY_PAD_NUMBER_PROVIDER provides the right names.

Parameters
aProviderthe provider
aExpNamesordered list of expected names

Definition at line 119 of file test_array_pad_name_provider.cpp.

References ARRAY_PAD_NUMBER_PROVIDER::GetNextPadNumber().

Referenced by BOOST_AUTO_TEST_CASE().

◆ FootprintWithPads()

static std::unique_ptr< FOOTPRINT > FootprintWithPads ( const std::vector< wxString >  aNames)
static

Make a footprint with a given list of named pads.

Definition at line 36 of file test_array_pad_name_provider.cpp.

References name, and pad.

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetFootprintAPNPCases()

std::vector< APNP_CASE > GetFootprintAPNPCases ( )

Get Array Pad Name Provider cases when a footprint is looked at to determine what names are available.

Definition at line 72 of file test_array_pad_name_provider.cpp.

References ARRAY_AXIS::NUMBERING_NUMERIC.

Referenced by BOOST_AUTO_TEST_CASE().