|
KiCad PCB EDA Suite
|
A scoped application of a wxLog target that counts error-level messages. More...
#include <unit_test_utils.h>
Public Member Functions | |
| SCOPED_COUNTING_WXLOG (unsigned *aLogCount, wxLogLevelValues aMaxLevel=wxLOG_Error) | |
| ~SCOPED_COUNTING_WXLOG () | |
| unsigned | GetCount () const |
Private Attributes | |
| COUNTING_WXLOG | m_logger |
| unsigned * | m_logCountRef |
| wxLog * | m_previous |
A scoped application of a wxLog target that counts error-level messages.
On destruction, the number of error-level messages logged is written to the given reference.
Definition at line 378 of file unit_test_utils.h.
|
inline |
| aLogCount | pointer to the counter. Will be written-back at destruction. If null, the count is not written back. This is useful if you have a tightly-defined scope and want to check the count after the scope ends. |
| aMaxLevel | the maximum log level to count (default: wxLOG_Error) |
Definition at line 388 of file unit_test_utils.h.
References m_logCountRef, m_logger, and SCOPED_WXLOG_TARGET::SCOPED_WXLOG_TARGET().
|
inline |
Definition at line 395 of file unit_test_utils.h.
References m_logCountRef, and m_logger.
|
inline |
Definition at line 405 of file unit_test_utils.h.
References m_logger.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
private |
Definition at line 409 of file unit_test_utils.h.
Referenced by SCOPED_COUNTING_WXLOG(), and ~SCOPED_COUNTING_WXLOG().
|
private |
Definition at line 408 of file unit_test_utils.h.
Referenced by GetCount(), SCOPED_COUNTING_WXLOG(), and ~SCOPED_COUNTING_WXLOG().
|
privateinherited |
Definition at line 50 of file wx_log_utils.h.
Referenced by SCOPED_WXLOG_TARGET(), and ~SCOPED_WXLOG_TARGET().