KiCad PCB EDA Suite
Loading...
Searching...
No Matches
INT_MATCHER Class Reference

Simple binary expectation that checks if an integer value meets the expectation (exact, at least, at most). More...

Public Member Functions

void Test (int aActual) const
 
std::string Describe () const
 

Static Public Member Functions

static INT_MATCHER FromJson (const nlohmann::json &aJson)
 
static INT_MATCHER Exact (int aValue)
 

Private Attributes

std::optional< int > m_min
 
std::optional< int > m_max
 

Detailed Description

Simple binary expectation that checks if an integer value meets the expectation (exact, at least, at most).

Definition at line 39 of file board_expectations.cpp.

Member Function Documentation

◆ Describe()

std::string INT_MATCHER::Describe ( ) const
inline

Definition at line 94 of file board_expectations.cpp.

References m_max, and m_min.

◆ Exact()

static INT_MATCHER INT_MATCHER::Exact ( int aValue)
inlinestatic

Definition at line 77 of file board_expectations.cpp.

References m_max, and m_min.

Referenced by createLayerExpectation().

◆ FromJson()

static INT_MATCHER INT_MATCHER::FromJson ( const nlohmann::json & aJson)
inlinestatic

Definition at line 42 of file board_expectations.cpp.

References m_max, and m_min.

Referenced by createFootprintExpectation(), createLayerExpectation(), and createNetExpectation().

◆ Test()

void INT_MATCHER::Test ( int aActual) const
inline

Definition at line 85 of file board_expectations.cpp.

References BOOST_TEST(), m_max, and m_min.

Member Data Documentation

◆ m_max

std::optional<int> INT_MATCHER::m_max
private

Definition at line 117 of file board_expectations.cpp.

Referenced by Describe(), Exact(), FromJson(), and Test().

◆ m_min

std::optional<int> INT_MATCHER::m_min
private

Definition at line 116 of file board_expectations.cpp.

Referenced by Describe(), Exact(), FromJson(), and Test().


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