5 #include "../tunit_export.h" 8 #include <xtd/diagnostics/stack_frame> 9 #include <xtd/date_time> 31 class tunit_export_
test final {
34 enum class test_status {
71 bool aborted()
const noexcept;
79 std::chrono::milliseconds elapsed_time()
const noexcept;
87 bool failed()
const noexcept;
95 bool not_started()
const noexcept;
99 bool succeed()
const noexcept;
111 std::function<void()> method()
const noexcept;
127 static intptr __internal_tunit_unit_tests_mode__;
135 static test& current_test();
136 static const test_class& current_test_class();
137 static const unit_test& current_unit_test();
138 static bool has_current_test();
139 static bool has_current_test_class();
140 static bool has_current_unit_test();
145 static test* current_test_;
146 static const test_class* current_test_class_;
147 static const unit_test* current_unit_test_;
152 std::function<void()> method_;
155 test_status status_ = test_status::not_started;
The base class for assert.
Definition: base_assert.h:29
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
Represents a test method.
Definition: test.h:31
The assert class contains a collection of static methods that implement the most common assertions us...
Definition: assert.h:36
Contains xtd::tunit::assert_error exception.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Represents a test class.
Definition: test_class.h:39
Represents an instant in time, typically expressed as a date and time of day.
Definition: date_time.h:78
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition: stack_frame.h:37
static stack_frame empty() noexcept
Return an empty stack frame.
Contains xtd::tunit::assert class.
The valid class contains a collection of static methods that implement the most common assertions use...
Definition: valid.h:22
The unit_test class is unit test base interface.
Definition: unit_test.h:35