KiCad PCB EDA Suite
Loading...
Searching...
No Matches
NET_EXPECTATION Class Reference
Inheritance diagram for NET_EXPECTATION:
KI_TEST::BOARD_EXPECTATION

Public Member Functions

void SetComment (std::string aComment)
 Set a comment to be included in the test output for this expectation, which can be used to provide more details about the expectation.
 
const std::string & GetComment () const
 

Public Attributes

std::optional< SCALAR_CONSTRAINTm_Count
 
std::vector< std::string > m_NamePatterns
 

Private Member Functions

std::vector< const NETINFO_ITEM * > findMatchingNets (const BOARD &aBrd) const
 
void doSimpleCountTest (const BOARD &aBrd) const
 
void RunTest (const BOARD &aBrd) const override
 
std::string GetName () const override
 

Static Private Member Functions

static bool nameMatches (const std::string &aName, const std::string &aPattern)
 

Private Attributes

std::string m_Comment
 

Detailed Description

Definition at line 337 of file board_expectations.cpp.

Member Function Documentation

◆ doSimpleCountTest()

void NET_EXPECTATION::doSimpleCountTest ( const BOARD & aBrd) const
inlineprivate

Definition at line 378 of file board_expectations.cpp.

References BOOST_TEST_CONTEXT(), CheckConstraint(), BOARD::GetNetCount(), and m_Count.

Referenced by RunTest().

◆ findMatchingNets()

std::vector< const NETINFO_ITEM * > NET_EXPECTATION::findMatchingNets ( const BOARD & aBrd) const
inlineprivate

Definition at line 349 of file board_expectations.cpp.

References BOARD::GetNetInfo(), m_NamePatterns, and nameMatches().

Referenced by RunTest().

◆ GetComment()

const std::string & KI_TEST::BOARD_EXPECTATION::GetComment ( ) const
inlineinherited

Definition at line 57 of file board_expectations.h.

References m_Comment.

◆ GetName()

std::string NET_EXPECTATION::GetName ( ) const
inlineoverrideprivatevirtual

Implements KI_TEST::BOARD_EXPECTATION.

Definition at line 431 of file board_expectations.cpp.

References m_Count, m_NamePatterns, and vecToString().

◆ nameMatches()

static bool NET_EXPECTATION::nameMatches ( const std::string & aName,
const std::string & aPattern )
inlinestaticprivate

Definition at line 344 of file board_expectations.cpp.

Referenced by findMatchingNets(), and RunTest().

◆ RunTest()

void NET_EXPECTATION::RunTest ( const BOARD & aBrd) const
inlineoverrideprivatevirtual

◆ SetComment()

void KI_TEST::BOARD_EXPECTATION::SetComment ( std::string aComment)
inlineinherited

Set a comment to be included in the test output for this expectation, which can be used to provide more details about the expectation.

Definition at line 56 of file board_expectations.h.

References m_Comment.

Member Data Documentation

◆ m_Comment

std::string KI_TEST::BOARD_EXPECTATION::m_Comment
privateinherited

Definition at line 60 of file board_expectations.h.

Referenced by GetComment(), and SetComment().

◆ m_Count

std::optional<SCALAR_CONSTRAINT> NET_EXPECTATION::m_Count

Definition at line 340 of file board_expectations.cpp.

Referenced by doSimpleCountTest(), GetName(), and RunTest().

◆ m_NamePatterns

std::vector<std::string> NET_EXPECTATION::m_NamePatterns

Definition at line 341 of file board_expectations.cpp.

Referenced by findMatchingNets(), GetName(), and RunTest().


The documentation for this class was generated from the following file: