9#include <xtd/collections/generic/list>
10#include <xtd/argument_collection>
11#include <xtd/date_time>
19 template<
typename test_
class_t>
142 template<typename test_class_t>
143 friend class
xtd::
tunit::test_class_attribute;
144 friend class
xtd::
tunit::test_class;
146 friend class
xtd::
tunit::base_assert;
150 [[nodiscard]] auto get_filename(const
xtd::
string& path) ->
xtd::
string;
151 [[nodiscard]] auto cdata_message_to_xml_string(const
xtd::
tunit::test& test) ->
xtd::
string;
152 [[nodiscard]] auto escape_path_to_json_string(const
xtd::
string& path) ->
xtd::
string;
153 [[nodiscard]] auto escape_to_json_string(const
xtd::
string& str) ->
xtd::
string;
154 [[nodiscard]] auto escape_to_xml_string(const
xtd::
string& str) ->
xtd::
string;
155 [[nodiscard]] auto message_to_json_string(const
xtd::
tunit::test& test) ->
xtd::
string;
156 [[nodiscard]] auto message_to_xml_string(const
xtd::
tunit::test& test) ->
xtd::
string;
157 [[nodiscard]] auto name_to_string(const
xtd::
string& name) ->
xtd::
string;
158 [[nodiscard]] auto status_to_string(const
xtd::
tunit::test& test) ->
xtd::
string;
159 [[nodiscard]] auto to_string(const
time_span& ms) ->
xtd::
string;
160 auto unit_test_cleanup() ->
void;
161 auto unit_test_initialize() ->
void;
162 auto write_list_tests_json() ->
void;
163 auto write_list_tests_xml() ->
void;
164 auto write_tests_json() ->
void;
165 auto write_tests_xml() ->
void;
168 xtd::
string name_ =
"AllTests";
171 int32 repeat_iteration_ = 0;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.hpp:83
Represents a time interval.
Definition time_span.hpp:29
Represent the event listener class. Unit test call theses events when unit tests are processing.
Definition event_listener.hpp:23
Represents the registered test class.
Definition registered_test_class.hpp:20
Represents a test class attribute.
Definition test_class_attribute.hpp:24
auto ignored_test_names() const noexcept -> xtd::array< xtd::string >
Gets the array of ignored test names.
auto succeed_test_count() const noexcept -> xtd::usize
Gets the succeed test count.
auto repeat_tests() const noexcept -> bool
Gets a boolean indictaes if there is repeat tests.
auto elapsed_time() const noexcept -> xtd::time_span
Gets the elapsed time for the execution of all tests in the unit test.
virtual auto list_tests(const xtd::array< xtd::string > &tests) -> xtd::int32
Lists the test names contained in the specified tests.
auto succeed_test_names() const noexcept -> xtd::array< xtd::string >
Gets the array of succeed test names.
auto failed_test_names() const noexcept -> xtd::array< xtd::string >
Gets the array of failed test names.
auto test_cases_count() const noexcept -> xtd::usize
Gets the test cases count.
auto run() noexcept -> xtd::int32
Runs all tests in this unit_test object and prints the result.
auto test_count() const noexcept -> xtd::usize
Gets the test count.
auto repeat_iteration_count() const noexcept -> xtd::int32
Gets the repeat iteration count.
auto aborted_test_count() const noexcept -> xtd::usize
Gets the aborted test count.
auto failed_test_count() const noexcept -> xtd::usize
Gets the failed test count.
virtual auto count_tests(xtd::int32 count) -> xtd::int32
Counts the test names contained in the specified tests.
virtual auto parse_arguments(const xtd::array< string > &args) -> bool
Parses the specified arguments.
auto repeat_iteration() const noexcept -> xtd::int32
Gets the repeat iteration number. A number between 0 and xtd::tunit::unit_test::repeat_iteration_coun...
auto aborted_test_names() const noexcept -> xtd::array< xtd::string >
Gets the array of aborted test names.
unit_test(xtd::uptr< xtd::tunit::event_listener > event_listener) noexcept
Initializes a new instance of xtd::tunit::unit_test with specified xtd::tunit::event_listener.
auto ignored_test_count() const noexcept -> xtd::usize
Gets the ignored test count.
Contains xtd::tunit::event_listener class.
#define tunit_export_
Define shared library export.
Definition tunit_export.hpp:13
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The tunit namespace contains a unit test library.
Definition abort_error.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::tunit::registered_test_class class.
Contains tunit_export_ keyword.
Contains xtd::tunit::settings class.