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

Test suite for LIB_SYMBOL. More...

Go to the source code of this file.

Classes

class  TEST_LIB_SYMBOL_FIXTURE
 
struct  TEST_LIB_SYMBOL_SUBREF_CASE
 

Functions

 BOOST_AUTO_TEST_CASE (DefaultProperties)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (DefaultDrawings)
 Check the drawings on a "blank" LIB_SYMBOL.
 
 BOOST_AUTO_TEST_CASE (DefaultFields)
 Check the default fields are present as expected.
 
 BOOST_AUTO_TEST_CASE (AddedFields)
 Test adding fields to a LIB_SYMBOL.
 
 BOOST_AUTO_TEST_CASE (AddedDrawItems)
 Test adding draw items to a LIB_SYMBOL.
 
 BOOST_AUTO_TEST_CASE (SubReference)
 Test the subreference indexing.
 
 BOOST_AUTO_TEST_CASE (Compare)
 Check the compare method.
 
 BOOST_AUTO_TEST_CASE (GetUnitItems)
 Check the fetch unit items code.
 
 BOOST_AUTO_TEST_CASE (GetUnitDrawItems)
 Check the fetch unit draw items code.
 
 BOOST_AUTO_TEST_CASE (Inheritance)
 Check inheritance support.
 
 BOOST_AUTO_TEST_CASE (CopyConstructor)
 Check the copy constructor.
 
 BOOST_AUTO_TEST_CASE (IsPowerTest)
 Check the power and legacy power symbol tests.
 

Detailed Description

Test suite for LIB_SYMBOL.

Definition in file test_lib_part.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/12]

BOOST_AUTO_TEST_CASE ( AddedDrawItems  )

Test adding draw items to a LIB_SYMBOL.

Definition at line 165 of file test_lib_part.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/12]

BOOST_AUTO_TEST_CASE ( AddedFields  )

Test adding fields to a LIB_SYMBOL.

Definition at line 123 of file test_lib_part.cpp.

References KI_TEST::AreDefaultFieldsCorrect(), KI_TEST::FieldNameIdMatches(), and MANDATORY_FIELDS.

◆ BOOST_AUTO_TEST_CASE() [3/12]

◆ BOOST_AUTO_TEST_CASE() [4/12]

BOOST_AUTO_TEST_CASE ( CopyConstructor  )

Check the copy constructor.

Definition at line 669 of file test_lib_part.cpp.

References BOOST_CHECK(), and copy.

◆ BOOST_AUTO_TEST_CASE() [5/12]

BOOST_AUTO_TEST_CASE ( DefaultDrawings  )

Check the drawings on a "blank" LIB_SYMBOL.

Definition at line 84 of file test_lib_part.cpp.

References MANDATORY_FIELDS.

◆ BOOST_AUTO_TEST_CASE() [6/12]

BOOST_AUTO_TEST_CASE ( DefaultFields  )

◆ BOOST_AUTO_TEST_CASE() [7/12]

BOOST_AUTO_TEST_CASE ( DefaultProperties  )

Declare the test suite.

Check that we can get the basic properties out as expected

Definition at line 59 of file test_lib_part.cpp.

◆ BOOST_AUTO_TEST_CASE() [8/12]

BOOST_AUTO_TEST_CASE ( GetUnitDrawItems  )

Check the fetch unit draw items code.

Definition at line 568 of file test_lib_part.cpp.

References BOOST_CHECK(), and LIB_PIN::SetNumber().

◆ BOOST_AUTO_TEST_CASE() [9/12]

BOOST_AUTO_TEST_CASE ( GetUnitItems  )

Check the fetch unit items code.

Definition at line 526 of file test_lib_part.cpp.

References BOOST_CHECK(), SCH_ITEM::SetBodyStyle(), LIB_PIN::SetNumber(), and SCH_ITEM::SetUnit().

◆ BOOST_AUTO_TEST_CASE() [10/12]

BOOST_AUTO_TEST_CASE ( Inheritance  )

Check inheritance support.

Definition at line 588 of file test_lib_part.cpp.

References BOOST_CHECK(), MANDATORY_FIELDS, EDA_ITEM::SetParent(), and SCH_FIELD::SetText().

◆ BOOST_AUTO_TEST_CASE() [11/12]

BOOST_AUTO_TEST_CASE ( IsPowerTest  )

Check the power and legacy power symbol tests.

Definition at line 679 of file test_lib_part.cpp.

References BOOST_CHECK(), pin, and PT_POWER_IN.

◆ BOOST_AUTO_TEST_CASE() [12/12]

BOOST_AUTO_TEST_CASE ( SubReference  )

Test the subreference indexing.

Definition at line 181 of file test_lib_part.cpp.

References BOOST_TEST_CONTEXT, and LIB_SYMBOL::LetterSubReference().