xtd 0.2.0
Loading...
Searching...
No Matches
test_class_attribute.h
Go to the documentation of this file.
1
4#pragma once
5#include "unit_test.h"
6#include <xtd/typeof>
7#include <xtd/string>
8
10namespace xtd {
12 namespace tunit {
23 template <typename test_class_t>
25 public:
27
31 explicit test_class_attribute(const xtd::string& name) noexcept {xtd::tunit::unit_test::add({name, xtd::new_sptr<test_class_t>()});}
33 };
34 }
35}
36
43#define test_class_(class_name) \
44 class_name; \
45 xtd::tunit::test_class_attribute<class_name> __##class_name##_attribute {typeof_<class_name>().full_name()}; \
46 class class_name : public xtd::tunit::test_class
47
78#define test_class_from_(class_name, from_class_name) \
79 class_name; \
80 xtd::tunit::test_class_attribute<class_name> __##class_name##_attribute {typeof_<class_name>().full_name()}; \
81 class class_name : public from_class_name
Represents text as a sequence of character units.
Definition basic_string.h:79
Represents a test class attribute.
Definition test_class_attribute.h:24
test_class_attribute(const xtd::string &name) noexcept
Creates a new instance of test_class_attribute with specified name.
Definition test_class_attribute.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::tunit::unit_test class.