KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_altium_parser_sch.cpp File Reference

Test suite for #ALTIUM_PARSER_SCH. More...

Go to the source code of this file.

Classes

struct  ALTIUM_PARSER_SCH_FIXTURE
 
struct  ALTIUM_TO_KICAD_UNIT_FRAC_CASE
 Declares the struct as the Boost test fixture. More...
 

Functions

int ReadKiCadUnitFrac (const std::map< wxString, wxString > &aProps, const wxString &aKey)
 
 BOOST_AUTO_TEST_CASE (PropertiesReadKiCadUnitFracConversation)
 Test conversation from Altium internal units into KiCad internal units using properties with FRAC.
 

Variables

static const std::vector< ALTIUM_TO_KICAD_UNIT_FRAC_CASEaltium_to_kicad_unit_frac
 A list of valid internal unit conversation factors.
 

Detailed Description

Test suite for #ALTIUM_PARSER_SCH.

Definition in file test_altium_parser_sch.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( PropertiesReadKiCadUnitFracConversation  )

Test conversation from Altium internal units into KiCad internal units using properties with FRAC.

Definition at line 88 of file test_altium_parser_sch.cpp.

References altium_to_kicad_unit_frac, and ReadKiCadUnitFrac().

◆ ReadKiCadUnitFrac()

Variable Documentation

◆ altium_to_kicad_unit_frac

const std::vector<ALTIUM_TO_KICAD_UNIT_FRAC_CASE> altium_to_kicad_unit_frac
static
Initial value:
= {
{ "0", "0", 0 },
{ "1", "0", 2540 },
{ "2", "0", 5080 },
{ "-1", "0", -2540 },
{ "-2", "0", -5080 },
{ "0", "1", 0 },
{ "0", "10", 0 },
{ "0", "100", 0 },
{ "0", "1000", 30 },
{ "0", "10000", 250 },
{ "1", "10000", 2790 },
{ "0", "-1", 0 },
{ "0", "-10", 0 },
{ "0", "-100", 0 },
{ "0", "-1000", -30 },
{ "0", "-10000", -250 },
{ "-1", "-10000", -2790 },
}

A list of valid internal unit conversation factors.

Definition at line 59 of file test_altium_parser_sch.cpp.

Referenced by BOOST_AUTO_TEST_CASE().