KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_footprint_realignment.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include <footprint_utils.h>
#include <footprint.h>
#include <pad.h>

Go to the source code of this file.

Classes

struct  FP_ALIGNMENT_TEST_CASE
 
struct  FP_REALIGNMENT_TEST_FIXTURE
 

Functions

 BOOST_DATA_TEST_CASE (TestAllCases, boost::unit_test::data::make(FpAlignmentTestCases), testCase)
 

Variables

static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_NoPins
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_OrigPin1
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_OrigBodyCenter
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_Rotated90DegCCW
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_OrigBodyCenter_Rotated90DegCCW
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_Pin4Deleted
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_Pin4Moved
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_Widened
 
static const std::vector< std::pair< std::string, VECTOR2I > > FpDef_DIP4_WithMPs
 
static const std::vector< FP_ALIGNMENT_TEST_CASEFpAlignmentTestCases
 

Function Documentation

◆ BOOST_DATA_TEST_CASE()

BOOST_DATA_TEST_CASE ( TestAllCases ,
boost::unit_test::data::make(FpAlignmentTestCases) ,
testCase  )

Definition at line 252 of file test_footprint_realignment.cpp.

References BOOST_DATA_TEST_CASE(), and FpAlignmentTestCases.

Variable Documentation

◆ FpAlignmentTestCases

const std::vector<FP_ALIGNMENT_TEST_CASE> FpAlignmentTestCases
static

Definition at line 189 of file test_footprint_realignment.cpp.

Referenced by BOOST_DATA_TEST_CASE().

◆ FpDef_DIP4_OrigBodyCenter

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_OrigBodyCenter
static
Initial value:
{
{ "1", { -1000, -500 } },
{ "2", { -1000, 500 } },
{ "3", { 1000, -500 } },
{ "4", { 1000, 500 } },
}

Definition at line 130 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_OrigBodyCenter_Rotated90DegCCW

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_OrigBodyCenter_Rotated90DegCCW
static
Initial value:
{
{ "1", { -500, 1000 } },
{ "2", { 500, 1000 } },
{ "3", { 500, -1000 } },
{ "4", { -500, -1000 } },
}

Definition at line 148 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_OrigPin1

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_OrigPin1
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 0, 1000 } },
{ "3", { 2000, 0 } },
{ "4", { 2000, 1000 } },
}

Definition at line 122 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_Pin4Deleted

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_Pin4Deleted
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 0, 1000 } },
{ "3", { 2000, 0 } },
}

Definition at line 156 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_Pin4Moved

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_Pin4Moved
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 0, 1000 } },
{ "3", { 2000, 0 } },
{ "4", { 2100, 1000 } },
}

Definition at line 163 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_Rotated90DegCCW

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_Rotated90DegCCW
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 1000, 0 } },
{ "3", { 1000, -2000 } },
{ "4", { 0, -2000 } },
}

Definition at line 140 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_Widened

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_Widened
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 0, 1000 } },
{ "3", { 2400, 0 } },
{ "4", { 2400, 1000 } },
}

Definition at line 171 of file test_footprint_realignment.cpp.

◆ FpDef_DIP4_WithMPs

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_DIP4_WithMPs
static
Initial value:
{
{ "1", { 0, 0 } },
{ "2", { 0, 1000 } },
{ "3", { 2000, 0 } },
{ "4", { 2000, 1000 } },
{ "MP", { -1000, 500 } },
{ "MP", { 3000, 500 } },
}

Definition at line 179 of file test_footprint_realignment.cpp.

◆ FpDef_NoPins

const std::vector<std::pair<std::string, VECTOR2I> > FpDef_NoPins
static
Initial value:
{
}

Definition at line 118 of file test_footprint_realignment.cpp.