43 "0000_0000|0000_0000|0000_0000|0000_1000|0000_0000|0000_0000|0000_0000|0000_0001" },
45 "0000_0000|0000_0000|0000_0000|0010_0000|0100_0000|0000_0000|0000_1000|0000_0000" }
53 BOOST_CHECK_EQUAL( c.expectedFmtHex, c.lset.FmtHex() );
62 BOOST_CHECK_EQUAL( c.expectedFmtBin, c.lset.FmtBin() );
66#define TEST_LAYER_NAME(layer_id, expected_name) \
67 BOOST_CHECK_EQUAL(LSET::Name(layer_id), wxString(expected_name))
97 for (
int i = 1; i <= 300; i++)
99 wxString layerName = wxString::Format(
"In%d.Cu", i);
108 for (
int i = 1; i <= 300; i++)
110 wxString layerName = wxString::Format(
"User.%d", i);
119 std::vector<std::pair<wxString, PCB_LAYER_ID>> layerTests = {
143 for (
const auto&
test : layerTests)
145 wxString layerName =
test.first;
155 wxString expected_name = wxString::Format(
"User.%d", (i -
Rescue) / 2 );
157 BOOST_CHECK_EQUAL( expected_name, actual_name );
165 wxString expected_name = wxString::Format(
"In%d.Cu", (i -
B_Cu) / 2);
LSET is a set of PCB_LAYER_IDs.
static int NameToLayer(wxString &aName)
Return the layer number from a layer name.
static wxString Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
PCB_LAYER_ID
A quick note on layer IDs:
#define TEST_LAYER_NAME(layer_id, expected_name)
static const std::vector< LSETS_TO_TEST > type_to_ext_cases
BOOST_AUTO_TEST_CASE(FmtHex)
std::string expectedFmtBin
std::string expectedFmtHex
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()