xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
xtd::tunit::unit_test Class Reference

#include <unit_test.h>

Definition

The template class.

Namespace
xtd::tunit
Library
xtd.tunit

Inherited by xtd::tunit::ostream_unit_test.

Public Member Functions

 unit_test (std::unique_ptr< xtd::tunit::event_listener > event_listener) noexcept
 
 unit_test (std::unique_ptr< xtd::tunit::event_listener > event_listener, int argc, char *argv[]) noexcept
 
size_t aborted_test_count () const noexcept
 
std::vector< std::string > aborted_test_names () const noexcept
 
std::chrono::milliseconds elapsed_time () const noexcept
 
size_t failed_test_count () const noexcept
 
std::vector< std::string > failed_test_names () const noexcept
 
size_t ignored_test_count () const noexcept
 
std::vector< std::string > ignored_test_names () const noexcept
 
int repeat_iteration () const noexcept
 
int repeat_iteration_count () const noexcept
 
bool repeat_tests () const noexcept
 
int run ()
 Runs all tests in this UnitTest object and prints the result.
 
size_t succeed_test_count () const noexcept
 
std::vector< std::string > succeed_test_names () const noexcept
 
size_t test_cases_count () const noexcept
 
size_t test_count () const noexcept
 

Protected Member Functions

virtual int list_tests (const std::vector< std::string > &tests)
 
virtual bool parse_arguments (const std::vector< std::string > &args)
 

Member Function Documentation

◆ run()

int xtd::tunit::unit_test::run ( )
inline

Runs all tests in this UnitTest object and prints the result.

Returns
EXIT_SUCCESS (0) if succeed; otherwise return EXIT_FAILURE (1).

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