KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/test_lset.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <layer_ids.h>
#include <lset.h>

Go to the source code of this file.

Classes

struct  LSETS_TO_TEST
 

Macros

#define TEST_LAYER_NAME(layer_id, expected_name)    BOOST_CHECK_EQUAL(LSET::Name(layer_id), wxString(expected_name))
 

Functions

 BOOST_AUTO_TEST_CASE (FmtHex)
 
 BOOST_AUTO_TEST_CASE (FmtBin)
 
 BOOST_AUTO_TEST_CASE (LSETNamePredefinedLayers)
 
 BOOST_AUTO_TEST_CASE (LSETNameToLayerInternalCuLayers)
 
 BOOST_AUTO_TEST_CASE (LSETNameToLayerUserDefinedLayers)
 
 BOOST_AUTO_TEST_CASE (LSETNameToLayerPredefinedLayers)
 
 BOOST_AUTO_TEST_CASE (LSETNameUserDefinedLayers)
 
 BOOST_AUTO_TEST_CASE (LSETNameInternalCuLayers)
 

Variables

static const std::vector< LSETS_TO_TESTtype_to_ext_cases
 

Macro Definition Documentation

◆ TEST_LAYER_NAME

#define TEST_LAYER_NAME (   layer_id,
  expected_name 
)     BOOST_CHECK_EQUAL(LSET::Name(layer_id), wxString(expected_name))

Definition at line 66 of file pcbnew/test_lset.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( FmtBin  )

Definition at line 58 of file pcbnew/test_lset.cpp.

References type_to_ext_cases.

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( FmtHex  )

Definition at line 49 of file pcbnew/test_lset.cpp.

References type_to_ext_cases.

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( LSETNameInternalCuLayers  )

Definition at line 162 of file pcbnew/test_lset.cpp.

References B_Cu, In1_Cu, In30_Cu, and TEST_LAYER_NAME.

◆ BOOST_AUTO_TEST_CASE() [4/8]

BOOST_AUTO_TEST_CASE ( LSETNamePredefinedLayers  )

◆ BOOST_AUTO_TEST_CASE() [5/8]

BOOST_AUTO_TEST_CASE ( LSETNameToLayerInternalCuLayers  )

Definition at line 95 of file pcbnew/test_lset.cpp.

References In1_Cu, and LSET::NameToLayer().

◆ BOOST_AUTO_TEST_CASE() [6/8]

BOOST_AUTO_TEST_CASE ( LSETNameToLayerPredefinedLayers  )

◆ BOOST_AUTO_TEST_CASE() [7/8]

BOOST_AUTO_TEST_CASE ( LSETNameToLayerUserDefinedLayers  )

Definition at line 106 of file pcbnew/test_lset.cpp.

References LSET::NameToLayer(), and User_1.

◆ BOOST_AUTO_TEST_CASE() [8/8]

BOOST_AUTO_TEST_CASE ( LSETNameUserDefinedLayers  )

Definition at line 152 of file pcbnew/test_lset.cpp.

References LSET::Name(), Rescue, User_1, and User_9.

Variable Documentation

◆ type_to_ext_cases

const std::vector<LSETS_TO_TEST> type_to_ext_cases
static
Initial value:
= {
{ LSET( { F_Cu, F_Fab } ), "00000008_00000001",
"0000_0000|0000_0000|0000_0000|0000_1000|0000_0000|0000_0000|0000_0000|0000_0001" },
{ LSET( { In14_Cu, B_Adhes, Rescue } ), "00000020_40000800",
"0000_0000|0000_0000|0000_0000|0010_0000|0100_0000|0000_0000|0000_1000|0000_0000" }
}
LSET is a set of PCB_LAYER_IDs.
Definition: lset.h:36
@ B_Adhes
Definition: layer_ids.h:103
@ F_Fab
Definition: layer_ids.h:119
@ Rescue
Definition: layer_ids.h:121
@ In14_Cu
Definition: layer_ids.h:79
@ F_Cu
Definition: layer_ids.h:64

Definition at line 41 of file pcbnew/test_lset.cpp.

Referenced by BOOST_AUTO_TEST_CASE().