![]() |
KiCad PCB EDA Suite
|
Test suite for LIB_PART. More...
#include <unit_test_utils/unit_test_utils.h>
#include <lib_rectangle.h>
#include <lib_arc.h>
#include <lib_pin.h>
#include "lib_field_test_utils.h"
Go to the source code of this file.
Classes | |
class | TEST_LIB_PART_FIXTURE |
struct | TEST_LIB_PART_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_PART. 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_PART. More... | |
BOOST_AUTO_TEST_CASE (AddedDrawItems) | |
Test adding draw items to a LIB_PART. 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... | |
Test suite for LIB_PART.
Definition in file test_lib_part.cpp.
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 | ( | DefaultDrawings | ) |
Check the drawings on a "blank" LIB_PART.
Definition at line 85 of file test_lib_part.cpp.
BOOST_AUTO_TEST_CASE | ( | DefaultFields | ) |
Check the default fields are present as expected.
Definition at line 96 of file test_lib_part.cpp.
References KI_TEST::AreDefaultFieldsCorrect(), KI_TEST::FieldNameIdMatches(), FOOTPRINT_FIELD, MANDATORY_FIELDS, REFERENCE_FIELD, and VALUE_FIELD.
BOOST_AUTO_TEST_CASE | ( | AddedFields | ) |
Test adding fields to a LIB_PART.
Definition at line 120 of file test_lib_part.cpp.
References KI_TEST::AreDefaultFieldsCorrect(), KI_TEST::FieldNameIdMatches(), and MANDATORY_FIELDS.
BOOST_AUTO_TEST_CASE | ( | AddedDrawItems | ) |
BOOST_AUTO_TEST_CASE | ( | SubReference | ) |
Test the subreference indexing.
Definition at line 178 of file test_lib_part.cpp.
References BOOST_TEST_CONTEXT.
BOOST_AUTO_TEST_CASE | ( | Compare | ) |
Check the compare method.
Definition at line 223 of file test_lib_part.cpp.
References LIB_PART::AddDrawItem(), BOOST_CHECK(), LIB_PART::Compare(), copy, LIB_PART::GetLibId(), LIB_PART::GetNextDrawItem(), LIB_PART::GetPinNameOffset(), LIB_ARC_T, LIB_PIN_T, LIB_RECTANGLE_T, LIB_PART::LockUnits(), LIB_PART::RemoveDrawItem(), LIB_PART::SetDescription(), LIB_PART::SetFPFilters(), LIB_PART::SetIncludeInBom(), LIB_PART::SetIncludeOnBoard(), LIB_PART::SetKeyWords(), LIB_PART::SetLibId(), LIB_ID::SetLibItemName(), LIB_PART::SetName(), LIB_PART::SetNormal(), LIB_PART::SetPinNameOffset(), LIB_PART::SetPower(), LIB_PART::SetShowPinNames(), LIB_PART::SetShowPinNumbers(), and LIB_PART::SetUnitCount().
BOOST_AUTO_TEST_CASE | ( | GetUnitItems | ) |
Check the fetch unit items code.
Definition at line 383 of file test_lib_part.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | GetUnitDrawItems | ) |
Check the fetch unit draw items code.
Definition at line 425 of file test_lib_part.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | Inheritance | ) |
Check inheritance support.
Definition at line 445 of file test_lib_part.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | CopyConstructor | ) |
Check the copy constructor.
Definition at line 468 of file test_lib_part.cpp.
References BOOST_CHECK(), and copy.