KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_reporting.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <reporter.h>
#include <cli_progress_reporter.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/statusbr.h>
#include <wx/log.h>
#include <vector>
#include <sstream>
#include <thread>

Go to the source code of this file.

Classes

class  TEST_REPORTER
 
class  MockTextCtrl
 
class  MockStatusBar
 

Functions

 BOOST_AUTO_TEST_CASE (BaseReporter_Constructor)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_SingleReport)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_MultipleReports)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_ReportTail)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_ReportHead)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_OperatorLeftShift)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_CharPointerReport)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_Clear)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_SeverityMask)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_EmptyMessage)
 
 BOOST_AUTO_TEST_CASE (BaseReporter_LongMessage)
 
 BOOST_AUTO_TEST_CASE (WxStringReporter_BasicFunctionality)
 
 BOOST_AUTO_TEST_CASE (WxStringReporter_MultipleMessages)
 
 BOOST_AUTO_TEST_CASE (WxStringReporter_Clear)
 
 BOOST_AUTO_TEST_CASE (WxStringReporter_SeverityMask)
 
 BOOST_AUTO_TEST_CASE (WxStringReporter_OperatorChaining)
 
 BOOST_AUTO_TEST_CASE (NullReporter_Singleton)
 
 BOOST_AUTO_TEST_CASE (NullReporter_SeverityMask)
 
 BOOST_AUTO_TEST_CASE (CliReporter_Singleton)
 
 BOOST_AUTO_TEST_CASE (CliReporter_VerboseDefault)
 
 BOOST_AUTO_TEST_CASE (CliReporter_VerboseToggle)
 
 BOOST_AUTO_TEST_CASE (StdoutReporter_Singleton)
 
 BOOST_AUTO_TEST_CASE (WxLogReporter_Singleton)
 
 BOOST_AUTO_TEST_CASE (ReporterInterface_Polymorphism)
 
 BOOST_AUTO_TEST_CASE (ReporterInterface_ChainedOperations)
 
 BOOST_AUTO_TEST_CASE (ReporterInterface_DefaultSeverity)
 
 BOOST_AUTO_TEST_CASE (ReporterInterface_UnitsDefault)
 
 BOOST_AUTO_TEST_CASE (CliProgressReporter_Singleton)
 
 BOOST_AUTO_TEST_CASE (CliProgressReporter_VerboseDefault)
 
 BOOST_AUTO_TEST_CASE (CliProgressReporter_VerboseToggle)
 
 BOOST_AUTO_TEST_CASE (SyncReporter_ForwardsEveryEntryPoint)
 
 BOOST_AUTO_TEST_CASE (SyncReporter_SerializesConcurrentReports)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_CharPointerReport )

Definition at line 190 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_ERROR.

◆ BOOST_AUTO_TEST_CASE() [2/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_Clear )

◆ BOOST_AUTO_TEST_CASE() [3/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_Constructor )

Definition at line 106 of file test_reporting.cpp.

References BOOST_AUTO_TEST_CASE(), MM, reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [4/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_EmptyMessage )

Definition at line 239 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [5/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_LongMessage )

Definition at line 252 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [6/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_MultipleReports )

◆ BOOST_AUTO_TEST_CASE() [7/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_OperatorLeftShift )

Definition at line 176 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_UNDEFINED.

◆ BOOST_AUTO_TEST_CASE() [8/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_ReportHead )

Definition at line 162 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_WARNING.

◆ BOOST_AUTO_TEST_CASE() [9/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_ReportTail )

Definition at line 148 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [10/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_SeverityMask )

◆ BOOST_AUTO_TEST_CASE() [11/32]

BOOST_AUTO_TEST_CASE ( BaseReporter_SingleReport )

Definition at line 115 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [12/32]

BOOST_AUTO_TEST_CASE ( CliProgressReporter_Singleton )

◆ BOOST_AUTO_TEST_CASE() [13/32]

BOOST_AUTO_TEST_CASE ( CliProgressReporter_VerboseDefault )

Definition at line 464 of file test_reporting.cpp.

References CLI_PROGRESS_REPORTER::GetInstance(), and reporter.

◆ BOOST_AUTO_TEST_CASE() [14/32]

BOOST_AUTO_TEST_CASE ( CliProgressReporter_VerboseToggle )

Definition at line 472 of file test_reporting.cpp.

References CLI_PROGRESS_REPORTER::GetInstance(), and reporter.

◆ BOOST_AUTO_TEST_CASE() [15/32]

BOOST_AUTO_TEST_CASE ( CliReporter_Singleton )

Definition at line 354 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), and CLI_REPORTER::GetInstance().

◆ BOOST_AUTO_TEST_CASE() [16/32]

BOOST_AUTO_TEST_CASE ( CliReporter_VerboseDefault )

Definition at line 362 of file test_reporting.cpp.

References CLI_REPORTER::GetInstance(), and reporter.

◆ BOOST_AUTO_TEST_CASE() [17/32]

BOOST_AUTO_TEST_CASE ( CliReporter_VerboseToggle )

Definition at line 370 of file test_reporting.cpp.

References CLI_REPORTER::GetInstance(), and reporter.

◆ BOOST_AUTO_TEST_CASE() [18/32]

BOOST_AUTO_TEST_CASE ( NullReporter_SeverityMask )

◆ BOOST_AUTO_TEST_CASE() [19/32]

BOOST_AUTO_TEST_CASE ( NullReporter_Singleton )

Definition at line 334 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), and NULL_REPORTER::GetInstance().

◆ BOOST_AUTO_TEST_CASE() [20/32]

BOOST_AUTO_TEST_CASE ( ReporterInterface_ChainedOperations )

◆ BOOST_AUTO_TEST_CASE() [21/32]

BOOST_AUTO_TEST_CASE ( ReporterInterface_DefaultSeverity )

Definition at line 438 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), reporter, and RPT_SEVERITY_UNDEFINED.

◆ BOOST_AUTO_TEST_CASE() [22/32]

BOOST_AUTO_TEST_CASE ( ReporterInterface_Polymorphism )

Definition at line 406 of file test_reporting.cpp.

References reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [23/32]

BOOST_AUTO_TEST_CASE ( ReporterInterface_UnitsDefault )

Definition at line 449 of file test_reporting.cpp.

References MM, and reporter.

◆ BOOST_AUTO_TEST_CASE() [24/32]

BOOST_AUTO_TEST_CASE ( StdoutReporter_Singleton )

Definition at line 387 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), and STDOUT_REPORTER::GetInstance().

◆ BOOST_AUTO_TEST_CASE() [25/32]

◆ BOOST_AUTO_TEST_CASE() [26/32]

BOOST_AUTO_TEST_CASE ( SyncReporter_SerializesConcurrentReports )

◆ BOOST_AUTO_TEST_CASE() [27/32]

BOOST_AUTO_TEST_CASE ( WxLogReporter_Singleton )

Definition at line 395 of file test_reporting.cpp.

References BOOST_CHECK_EQUAL(), and WXLOG_REPORTER::GetInstance().

◆ BOOST_AUTO_TEST_CASE() [28/32]

BOOST_AUTO_TEST_CASE ( WxStringReporter_BasicFunctionality )

Definition at line 266 of file test_reporting.cpp.

References reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [29/32]

BOOST_AUTO_TEST_CASE ( WxStringReporter_Clear )

Definition at line 293 of file test_reporting.cpp.

References reporter, and RPT_SEVERITY_INFO.

◆ BOOST_AUTO_TEST_CASE() [30/32]

BOOST_AUTO_TEST_CASE ( WxStringReporter_MultipleMessages )

Definition at line 279 of file test_reporting.cpp.

References reporter, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.

◆ BOOST_AUTO_TEST_CASE() [31/32]

BOOST_AUTO_TEST_CASE ( WxStringReporter_OperatorChaining )

Definition at line 319 of file test_reporting.cpp.

References reporter, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.

◆ BOOST_AUTO_TEST_CASE() [32/32]

BOOST_AUTO_TEST_CASE ( WxStringReporter_SeverityMask )