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

Test suite for LIB_SYMBOL. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <sch_shape.h>
#include <sch_pin.h>
#include <lib_symbol.h>
#include "lib_field_test_utils.h"

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 166 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 124 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 670 of file test_lib_part.cpp.

References copy.

◆ BOOST_AUTO_TEST_CASE() [5/12]

BOOST_AUTO_TEST_CASE ( DefaultDrawings  )

Check the drawings on a "blank" LIB_SYMBOL.

Definition at line 85 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 60 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 569 of file test_lib_part.cpp.

References SCH_PIN::SetNumber().

◆ BOOST_AUTO_TEST_CASE() [9/12]

BOOST_AUTO_TEST_CASE ( GetUnitItems  )

Check the fetch unit items code.

Definition at line 527 of file test_lib_part.cpp.

References SCH_ITEM::SetBodyStyle(), SCH_PIN::SetNumber(), and SCH_ITEM::SetUnit().

◆ BOOST_AUTO_TEST_CASE() [10/12]

BOOST_AUTO_TEST_CASE ( Inheritance  )

Check inheritance support.

Definition at line 589 of file test_lib_part.cpp.

References 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 680 of file test_lib_part.cpp.

References pin, and PT_POWER_IN.

◆ BOOST_AUTO_TEST_CASE() [12/12]

BOOST_AUTO_TEST_CASE ( SubReference  )

Test the subreference indexing.

Definition at line 182 of file test_lib_part.cpp.

References LIB_SYMBOL::LetterSubReference().