KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_collector.cpp File Reference
#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)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/33]

BOOST_AUTO_TEST_CASE ( Append_MultipleItems  )

◆ BOOST_AUTO_TEST_CASE() [2/33]

BOOST_AUTO_TEST_CASE ( Append_NullItem  )

◆ BOOST_AUTO_TEST_CASE() [3/33]

BOOST_AUTO_TEST_CASE ( Append_SingleItem  )

◆ BOOST_AUTO_TEST_CASE() [4/33]

BOOST_AUTO_TEST_CASE ( Combine_EmptyBackupList  )

◆ BOOST_AUTO_TEST_CASE() [5/33]

BOOST_AUTO_TEST_CASE ( Combine_RestoresBackupItems  )

◆ BOOST_AUTO_TEST_CASE() [6/33]

◆ BOOST_AUTO_TEST_CASE() [7/33]

BOOST_AUTO_TEST_CASE ( Constructor_DefaultValues  )

◆ BOOST_AUTO_TEST_CASE() [8/33]

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() [9/33]

BOOST_AUTO_TEST_CASE ( CountType_SingleType  )

◆ BOOST_AUTO_TEST_CASE() [10/33]

BOOST_AUTO_TEST_CASE ( Empty_ClearsList  )

◆ BOOST_AUTO_TEST_CASE() [11/33]

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() [12/33]

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() [13/33]

BOOST_AUTO_TEST_CASE ( HasItem_NonExistingItem  )

◆ BOOST_AUTO_TEST_CASE() [14/33]

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() [15/33]

BOOST_AUTO_TEST_CASE ( Inspect_BasicFunctionality  )

◆ BOOST_AUTO_TEST_CASE() [16/33]

BOOST_AUTO_TEST_CASE ( Inspect_WithScanTypes  )

◆ BOOST_AUTO_TEST_CASE() [17/33]

BOOST_AUTO_TEST_CASE ( Iterator_BeginEnd  )

◆ BOOST_AUTO_TEST_CASE() [18/33]

BOOST_AUTO_TEST_CASE ( Iterator_ConstIterator  )

◆ BOOST_AUTO_TEST_CASE() [19/33]

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() [20/33]

BOOST_AUTO_TEST_CASE ( OperatorBrackets_EmptyCollector  )

Definition at line 373 of file test_collector.cpp.

References BOOST_CHECK_EQUAL().

◆ BOOST_AUTO_TEST_CASE() [21/33]

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() [22/33]

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() [23/33]

BOOST_AUTO_TEST_CASE ( Remove_ByIndex_FirstItem  )

◆ BOOST_AUTO_TEST_CASE() [24/33]

BOOST_AUTO_TEST_CASE ( Remove_ByIndex_LastItem  )

◆ BOOST_AUTO_TEST_CASE() [25/33]

BOOST_AUTO_TEST_CASE ( Remove_ByIndex_ValidIndex  )

◆ BOOST_AUTO_TEST_CASE() [26/33]

BOOST_AUTO_TEST_CASE ( Remove_ByPointer_DuplicateItems  )

◆ BOOST_AUTO_TEST_CASE() [27/33]

BOOST_AUTO_TEST_CASE ( Remove_ByPointer_ExistingItem  )

◆ BOOST_AUTO_TEST_CASE() [28/33]

BOOST_AUTO_TEST_CASE ( Remove_ByPointer_NonExistingItem  )

◆ BOOST_AUTO_TEST_CASE() [29/33]

BOOST_AUTO_TEST_CASE ( SetRefPos_Basic  )

Definition at line 459 of file test_collector.cpp.

References COLLECTOR::SetRefPos().

◆ BOOST_AUTO_TEST_CASE() [30/33]

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() [31/33]

BOOST_AUTO_TEST_CASE ( Transfer_ByIndex_ValidIndex  )

◆ BOOST_AUTO_TEST_CASE() [32/33]

BOOST_AUTO_TEST_CASE ( Transfer_ByPointer_ExistingItem  )

◆ BOOST_AUTO_TEST_CASE() [33/33]

BOOST_AUTO_TEST_CASE ( Transfer_ByPointer_NonExistingItem  )

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const INSPECT_RESULT result 
)

Definition at line 80 of file test_collector.cpp.

References CONTINUE, operator<<(), and QUIT.