KiCad PCB EDA Suite
|
Test suite for LIB_SYMBOL. More...
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <lib_shape.h>
#include <lib_pin.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. More... | |
BOOST_AUTO_TEST_CASE (DefaultDrawings) | |
Check the drawings on a "blank" LIB_SYMBOL. More... | |
BOOST_AUTO_TEST_CASE (DefaultFields) | |
Check the default fields are present as expected. More... | |
BOOST_AUTO_TEST_CASE (AddedFields) | |
Test adding fields to a LIB_SYMBOL. More... | |
BOOST_AUTO_TEST_CASE (AddedDrawItems) | |
Test adding draw items to a LIB_SYMBOL. More... | |
BOOST_AUTO_TEST_CASE (SubReference) | |
Test the subreference indexing. More... | |
BOOST_AUTO_TEST_CASE (Compare) | |
Check the compare method. More... | |
BOOST_AUTO_TEST_CASE (GetUnitItems) | |
Check the fetch unit items code. More... | |
BOOST_AUTO_TEST_CASE (GetUnitDrawItems) | |
Check the fetch unit draw items code. More... | |
BOOST_AUTO_TEST_CASE (Inheritance) | |
Check inheritance support. More... | |
BOOST_AUTO_TEST_CASE (CopyConstructor) | |
Check the copy constructor. More... | |
BOOST_AUTO_TEST_CASE (IsPowerTest) | |
Check the power and legacy power symbol tests. More... | |
Test suite for LIB_SYMBOL.
Definition in file test_lib_part.cpp.
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 | ( | 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 | ( | Compare | ) |
Check the compare method.
Definition at line 371 of file test_lib_part.cpp.
References LIB_SYMBOL::AddDrawItem(), ARC, BOOST_CHECK(), LIB_SYMBOL::Compare(), copy, LIB_SYMBOL::GetDrawItems(), LIB_SYMBOL::GetLibId(), LIB_SYMBOL::GetPinNameOffset(), LIB_PIN_T, LIB_SHAPE_T, LIB_SYMBOL::LockUnits(), RECTANGLE, LIB_SYMBOL::RemoveDrawItem(), LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetExcludedFromBoard(), LIB_SYMBOL::SetExcludedFromBOM(), LIB_SYMBOL::SetFPFilters(), LIB_SYMBOL::SetKeyWords(), LIB_SYMBOL::SetLibId(), LIB_ID::SetLibItemName(), LIB_SYMBOL::SetName(), LIB_SYMBOL::SetNormal(), LIB_SYMBOL::SetPinNameOffset(), LIB_SYMBOL::SetPower(), LIB_SYMBOL::SetShowPinNames(), LIB_SYMBOL::SetShowPinNumbers(), and LIB_SYMBOL::SetUnitCount().
BOOST_AUTO_TEST_CASE | ( | CopyConstructor | ) |
Check the copy constructor.
Definition at line 666 of file test_lib_part.cpp.
References BOOST_CHECK(), and copy.
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 | ( | DefaultFields | ) |
Check the default fields are present as expected.
Definition at line 95 of file test_lib_part.cpp.
References KI_TEST::AreDefaultFieldsCorrect(), DATASHEET_FIELD, DESCRIPTION_FIELD, KI_TEST::FieldNameIdMatches(), FOOTPRINT_FIELD, MANDATORY_FIELDS, REFERENCE_FIELD, and VALUE_FIELD.
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 | ( | GetUnitDrawItems | ) |
Check the fetch unit draw items code.
Definition at line 573 of file test_lib_part.cpp.
References BOOST_CHECK(), and LIB_PIN::SetNumber().
BOOST_AUTO_TEST_CASE | ( | GetUnitItems | ) |
Check the fetch unit items code.
Definition at line 531 of file test_lib_part.cpp.
References BOOST_CHECK(), LIB_ITEM::SetConvert(), LIB_PIN::SetNumber(), and LIB_ITEM::SetUnit().
BOOST_AUTO_TEST_CASE | ( | Inheritance | ) |
Check inheritance support.
Definition at line 593 of file test_lib_part.cpp.
References BOOST_CHECK(), MANDATORY_FIELDS, and EDA_TEXT::SetText().
BOOST_AUTO_TEST_CASE | ( | IsPowerTest | ) |
Check the power and legacy power symbol tests.
Definition at line 676 of file test_lib_part.cpp.
References BOOST_CHECK(), pin, and PT_POWER_IN.
BOOST_AUTO_TEST_CASE | ( | SubReference | ) |
Test the subreference indexing.
Definition at line 181 of file test_lib_part.cpp.
References BOOST_TEST_CONTEXT.