KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>
#include <collector.h>
#include <eda_item.h>
#include <vector>
#include <ostream>
Go to the source code of this file.
Classes | |
class | TEST_EDA_ITEM |
class | TEST_COLLECTOR |
Functions | |
std::ostream & | operator<< (std::ostream &os, const INSPECT_RESULT &result) |
BOOST_AUTO_TEST_CASE (Constructor_DefaultValues) | |
BOOST_AUTO_TEST_CASE (Append_SingleItem) | |
BOOST_AUTO_TEST_CASE (Append_MultipleItems) | |
BOOST_AUTO_TEST_CASE (Append_NullItem) | |
BOOST_AUTO_TEST_CASE (Empty_ClearsList) | |
BOOST_AUTO_TEST_CASE (Remove_ByIndex_ValidIndex) | |
BOOST_AUTO_TEST_CASE (Remove_ByIndex_FirstItem) | |
BOOST_AUTO_TEST_CASE (Remove_ByIndex_LastItem) | |
BOOST_AUTO_TEST_CASE (Remove_ByPointer_ExistingItem) | |
BOOST_AUTO_TEST_CASE (Remove_ByPointer_NonExistingItem) | |
BOOST_AUTO_TEST_CASE (Remove_ByPointer_DuplicateItems) | |
BOOST_AUTO_TEST_CASE (Transfer_ByIndex_ValidIndex) | |
BOOST_AUTO_TEST_CASE (Transfer_ByPointer_ExistingItem) | |
BOOST_AUTO_TEST_CASE (Transfer_ByPointer_NonExistingItem) | |
BOOST_AUTO_TEST_CASE (Combine_RestoresBackupItems) | |
BOOST_AUTO_TEST_CASE (Combine_EmptyBackupList) | |
BOOST_AUTO_TEST_CASE (OperatorBrackets_ValidIndex) | |
BOOST_AUTO_TEST_CASE (OperatorBrackets_InvalidIndex) | |
BOOST_AUTO_TEST_CASE (OperatorBrackets_EmptyCollector) | |
BOOST_AUTO_TEST_CASE (HasItem_ExistingItem) | |
BOOST_AUTO_TEST_CASE (HasItem_NonExistingItem) | |
BOOST_AUTO_TEST_CASE (HasItem_NullItem) | |
BOOST_AUTO_TEST_CASE (HasItem_EmptyCollector) | |
BOOST_AUTO_TEST_CASE (CountType_SingleType) | |
BOOST_AUTO_TEST_CASE (CountType_EmptyCollector) | |
BOOST_AUTO_TEST_CASE (SetScanTypes_Basic) | |
BOOST_AUTO_TEST_CASE (SetRefPos_Basic) | |
BOOST_AUTO_TEST_CASE (Iterator_BeginEnd) | |
BOOST_AUTO_TEST_CASE (Iterator_RangeBasedFor) | |
BOOST_AUTO_TEST_CASE (Iterator_ConstIterator) | |
BOOST_AUTO_TEST_CASE (Inspect_BasicFunctionality) | |
BOOST_AUTO_TEST_CASE (Inspect_WithScanTypes) | |
BOOST_AUTO_TEST_CASE (ComplexWorkflow_TransferAndCombine) | |
BOOST_AUTO_TEST_CASE | ( | Append_MultipleItems | ) |
Definition at line 114 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_TRACE_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | Append_NullItem | ) |
Definition at line 131 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), and COLLECTOR::GetCount().
BOOST_AUTO_TEST_CASE | ( | Append_SingleItem | ) |
Definition at line 103 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | Combine_EmptyBackupList | ) |
Definition at line 333 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::Combine(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | Combine_RestoresBackupItems | ) |
Definition at line 307 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::Combine(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Transfer().
BOOST_AUTO_TEST_CASE | ( | ComplexWorkflow_TransferAndCombine | ) |
Definition at line 564 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::Combine(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), COLLECTOR::HasItem(), PCB_PAD_T, PCB_T, PCB_TRACE_T, PCB_VIA_T, COLLECTOR::Remove(), and COLLECTOR::Transfer().
BOOST_AUTO_TEST_CASE | ( | Constructor_DefaultValues | ) |
Definition at line 93 of file test_collector.cpp.
References BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), COLLECTOR::m_MenuCancelled, and COLLECTOR::m_Threshold.
BOOST_AUTO_TEST_CASE | ( | CountType_EmptyCollector | ) |
Definition at line 441 of file test_collector.cpp.
References BOOST_CHECK_EQUAL(), COLLECTOR::CountType(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | CountType_SingleType | ) |
Definition at line 425 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::CountType(), PCB_T, PCB_TRACE_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | Empty_ClearsList | ) |
Definition at line 141 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::Empty(), COLLECTOR::GetCount(), PCB_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | HasItem_EmptyCollector | ) |
Definition at line 417 of file test_collector.cpp.
References COLLECTOR::HasItem(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | HasItem_ExistingItem | ) |
Definition at line 380 of file test_collector.cpp.
References COLLECTOR::Append(), COLLECTOR::HasItem(), PCB_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | HasItem_NonExistingItem | ) |
Definition at line 393 of file test_collector.cpp.
References COLLECTOR::Append(), COLLECTOR::HasItem(), PCB_T, PCB_TRACE_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | HasItem_NullItem | ) |
Definition at line 406 of file test_collector.cpp.
References COLLECTOR::Append(), COLLECTOR::HasItem(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | Inspect_BasicFunctionality | ) |
Definition at line 532 of file test_collector.cpp.
References BOOST_CHECK_EQUAL(), CONTINUE, COLLECTOR::GetCount(), TEST_COLLECTOR::GetInspectCalls(), TEST_COLLECTOR::Inspect(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | Inspect_WithScanTypes | ) |
Definition at line 544 of file test_collector.cpp.
References BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), COLLECTOR::HasItem(), TEST_COLLECTOR::Inspect(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::SetScanTypes().
BOOST_AUTO_TEST_CASE | ( | Iterator_BeginEnd | ) |
Definition at line 470 of file test_collector.cpp.
References COLLECTOR::Append(), COLLECTOR::begin(), BOOST_CHECK_EQUAL(), COLLECTOR::end(), PCB_T, PCB_TRACE_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | Iterator_ConstIterator | ) |
Definition at line 513 of file test_collector.cpp.
References COLLECTOR::Append(), COLLECTOR::begin(), BOOST_CHECK_EQUAL(), COLLECTOR::end(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | Iterator_RangeBasedFor | ) |
Definition at line 493 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), PCB_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | OperatorBrackets_EmptyCollector | ) |
Definition at line 373 of file test_collector.cpp.
References BOOST_CHECK_EQUAL().
BOOST_AUTO_TEST_CASE | ( | OperatorBrackets_InvalidIndex | ) |
Definition at line 361 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), and PCB_T.
BOOST_AUTO_TEST_CASE | ( | OperatorBrackets_ValidIndex | ) |
Definition at line 348 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), PCB_T, and PCB_VIA_T.
BOOST_AUTO_TEST_CASE | ( | Remove_ByIndex_FirstItem | ) |
Definition at line 174 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_VIA_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | Remove_ByIndex_LastItem | ) |
Definition at line 189 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_VIA_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | Remove_ByIndex_ValidIndex | ) |
Definition at line 156 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | Remove_ByPointer_DuplicateItems | ) |
Definition at line 239 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | Remove_ByPointer_ExistingItem | ) |
Definition at line 204 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | Remove_ByPointer_NonExistingItem | ) |
Definition at line 222 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Remove().
BOOST_AUTO_TEST_CASE | ( | SetRefPos_Basic | ) |
Definition at line 459 of file test_collector.cpp.
References COLLECTOR::SetRefPos().
BOOST_AUTO_TEST_CASE | ( | SetScanTypes_Basic | ) |
Definition at line 448 of file test_collector.cpp.
References PCB_T, PCB_VIA_T, and COLLECTOR::SetScanTypes().
BOOST_AUTO_TEST_CASE | ( | Transfer_ByIndex_ValidIndex | ) |
Definition at line 253 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Transfer().
BOOST_AUTO_TEST_CASE | ( | Transfer_ByPointer_ExistingItem | ) |
Definition at line 272 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Transfer().
BOOST_AUTO_TEST_CASE | ( | Transfer_ByPointer_NonExistingItem | ) |
Definition at line 291 of file test_collector.cpp.
References COLLECTOR::Append(), BOOST_CHECK_EQUAL(), COLLECTOR::GetCount(), COLLECTOR::HasAdditionalItems(), PCB_T, PCB_TRACE_T, PCB_VIA_T, and COLLECTOR::Transfer().
std::ostream & operator<< | ( | std::ostream & | os, |
const INSPECT_RESULT & | result | ||
) |
Definition at line 80 of file test_collector.cpp.
References CONTINUE, operator<<(), and QUIT.