31 template<
typename test_
class_t>
44#define test_cleanup_(method_name) \
45 __##method_name##_unused() = delete; \
46 class __test_cleanup_attribute : public xtd::tunit::test_cleanup_attribute { \
48 template<typename test_class> __test_cleanup_attribute(test_class& test) : test_cleanup_attribute(#method_name, test, &test_class::method_name) {} \
49 } __test_cleanup_attribute {*this}; \
50 static void method_name()
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:47
static stack_frame current(const xtd::source_location &value=xtd::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
Represents a test class.
Definition test_class.h:39
void add_test_cleanup(const xtd::tunit::test &test_cleanup) noexcept
Adds the test cleanup method.
Represents a test cleanup attribute.
Definition test_cleanup_attribute.h:21
test_cleanup_attribute(const std::string &name, test_class_t &test_class, void(*method)(), const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current()) noexcept
Creates a new instance of test_cleanup_attribute with specified name, test class, method and stack fr...
Definition test_cleanup_attribute.h:32
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::tunit::test class.