xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.tunit
include
xtd
tunit
test_class_attribute.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
unit_test.hpp
"
6
#include <xtd/typeof>
7
#include <xtd/string>
8
10
namespace
xtd
{
12
namespace
tunit
{
23
template
<
typename
test_
class
_t>
24
class
test_class_attribute
final {
25
public
:
27
31
explicit
test_class_attribute
() noexcept :
test_class_attribute
(
xtd
::type_of<test_class_t>().full_name()) {}
34
explicit
test_class_attribute
(
const
xtd::string
& name)
noexcept
{xtd::tunit::unit_test::add({name,
xtd::new_sptr<test_class_t>
()});}
36
};
37
}
38
}
39
46
#define test_class_(class_name) \
47
class_name; \
48
inline auto __##class_name##_attribute = xtd::tunit::test_class_attribute<class_name> {typeof_<class_name>().full_name()}; \
49
class class_name : public xtd::tunit::test_class
50
81
#define test_class_from_(class_name, from_class_name) \
82
class_name; \
83
xtd::tunit::test_class_attribute<class_name> __##class_name##_attribute {typeof_<class_name>().full_name()}; \
84
class class_name : public from_class_name
xtd::tunit::test_class_attribute::test_class_attribute
test_class_attribute() noexcept
Creates a new instance of test_class_attribute.
Definition
test_class_attribute.hpp:31
xtd::tunit::test_class_attribute::test_class_attribute
test_class_attribute(const xtd::string &name) noexcept
Creates a new instance of test_class_attribute with specified name.
Definition
test_class_attribute.hpp:34
xtd::string
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition
__string_definitions.hpp:43
xtd::new_sptr
auto new_sptr(args_t &&... args) -> xtd::sptr< type_t >
xtd::new_sptr operator creates a xtd::sptr object.
Definition
new_sptr.hpp:24
xtd::tunit
The tunit namespace contains a unit test library.
Definition
abort_error.hpp:10
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
unit_test.hpp
Contains xtd::tunit::unit_test class.
Generated on
for xtd by
Gammasoft
. All rights reserved.