Skip to content

Commit

Permalink
doxygen metadata: add @headerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Dec 5, 2023
1 parent 94ff7d7 commit f776b18
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 7 deletions.
15 changes: 15 additions & 0 deletions include/micro-os-plus/detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace micro_os_plus::micro_test_plus
{
/**
* @brief An object used to pass assertion parameters to the evaluator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Expr_T>
struct assertion
Expand Down Expand Up @@ -95,6 +96,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Equality comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct eq_ : type_traits::op
Expand Down Expand Up @@ -180,6 +182,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Non-equality comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct ne_ : type_traits::op
Expand Down Expand Up @@ -254,6 +257,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Greater than comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct gt_ : type_traits::op
Expand Down Expand Up @@ -311,6 +315,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Greater than or equal comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct ge_ : type_traits::op
Expand Down Expand Up @@ -368,6 +373,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Less than comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct lt_ : type_traits::op
Expand Down Expand Up @@ -426,6 +432,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Less than or equal comparator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct le_ : type_traits::op
Expand Down Expand Up @@ -485,6 +492,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Logical and operator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct and_ : type_traits::op
Expand Down Expand Up @@ -520,6 +528,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Logical or operator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Lhs_T, class Rhs_T>
struct or_ : type_traits::op
Expand Down Expand Up @@ -555,6 +564,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Logical not operator.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T>
struct not_ : type_traits::op
Expand Down Expand Up @@ -583,6 +593,7 @@ namespace micro_os_plus::micro_test_plus
#if defined(__cpp_exceptions)
/**
* @brief Operator to check if the expression throws a specific exception.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Callable_T, class Exception_T = void>
struct throws_ : type_traits::op
Expand Down Expand Up @@ -617,6 +628,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Operator to check if the expression throws any exception.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Callable_T>
struct throws_<Callable_T, void> : type_traits::op
Expand Down Expand Up @@ -647,6 +659,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Operator to check if the expression does not throw any exception.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Callable_T>
struct nothrow_ : type_traits::op
Expand Down Expand Up @@ -681,6 +694,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @brief Base class for a deferred reporter, that collects the
* messages into a string.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class deferred_reporter_base
{
Expand Down Expand Up @@ -715,6 +729,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @brief Class template for a deferred reporter specific
* to an expression.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class Expr_T>
class deferred_reporter : public deferred_reporter_base
Expand Down
9 changes: 2 additions & 7 deletions include/micro-os-plus/literals.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @deprecated Use `to_t` (since 3.2.0).
* @}
*/

/**
* @ingroup micro-test-plus-literals
* @brief Template for wrapping any other type.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T>
struct _t : type_traits::value<T>
Expand All @@ -411,7 +406,6 @@ namespace micro_os_plus::micro_test_plus
}
};


/**
* @addtogroup micro-test-plus-literals
* @{
Expand Down Expand Up @@ -475,6 +469,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @ingroup micro-test-plus-literals
* @brief Template for wrapping any other type.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
* @since 3.2.0
*
* @details
Expand Down
1 change: 1 addition & 0 deletions include/micro-os-plus/reflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ namespace micro_os_plus::micro_test_plus
#else
/**
* @brief Local implementation of the std::source_location.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class source_location
{
Expand Down
3 changes: 3 additions & 0 deletions include/micro-os-plus/test-reporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Colours used to highlight pass vs. fail.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
struct colors
{
Expand All @@ -59,6 +60,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief The verbosity levels.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
enum class verbosity
{
Expand All @@ -80,6 +82,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @brief Reporter to display the test results. For failed
* tests it prints the actual values of the operands, with their types.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class test_reporter
{
Expand Down
1 change: 1 addition & 0 deletions include/micro-os-plus/test-runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @brief The test runner. It maintains a list of test suites which
* automatically register themselves in their constructors.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class test_runner
{
Expand Down
2 changes: 2 additions & 0 deletions include/micro-os-plus/test-suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Base class for all test suites.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class test_suite_base
{
Expand Down Expand Up @@ -249,6 +250,7 @@ namespace micro_os_plus::micro_test_plus
* @ingroup micro-test-plus-test-suites
* @brief Test suites are classes that represent a named group of
* test cases which self register to the runner.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
class test_suite : public test_suite_base
{
Expand Down
32 changes: 32 additions & 0 deletions include/micro-os-plus/type-traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ namespace micro_os_plus::micro_test_plus
*/
namespace type_traits
{
/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class...>
struct list
{
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T, class...>
struct identity
{
Expand All @@ -69,27 +75,39 @@ namespace micro_os_plus::micro_test_plus
};
#endif

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class R, class... Args_T>
struct function_traits<R (*) (Args_T...)>
{
using result_type = R;
using args = list<Args_T...>;
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class R, class... Args_T>
struct function_traits<R (Args_T...)>
{
using result_type = R;
using args = list<Args_T...>;
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class R, class T, class... Args_T>
struct function_traits<R (T::*) (Args_T...)>
{
using result_type = R;
using args = list<Args_T...>;
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class R, class T, class... Args_T>
struct function_traits<R (T::*) (Args_T...) const>
{
Expand Down Expand Up @@ -159,11 +177,17 @@ namespace micro_os_plus::micro_test_plus
constexpr auto is_convertible_v = is_convertible<From, To> (0);
#endif

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <bool>
struct requires_
{
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <>
struct requires_<true>
{
Expand All @@ -175,6 +199,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Empty base class of all operators.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
struct op
{
Expand All @@ -183,6 +208,7 @@ namespace micro_os_plus::micro_test_plus
/**
* @brief A generic integral constant.
* It has a getter and a '-' operator to return the negative value.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <auto N>
struct integral_constant : op
Expand Down Expand Up @@ -213,6 +239,7 @@ namespace micro_os_plus::micro_test_plus
* @brief A generic floating point constant, with custom size
* and precision.
* It has a getter and a '-' operator to return the negative value.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T, auto N, auto D, auto Size, auto P = 1>
struct floating_point_constant : op
Expand Down Expand Up @@ -242,6 +269,9 @@ namespace micro_os_plus::micro_test_plus
}
};

/**
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T>
struct genuine_integral_value : op
{
Expand Down Expand Up @@ -271,6 +301,7 @@ namespace micro_os_plus::micro_test_plus

/**
* @brief Class defining a generic value, accessible via a getter.
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T, class = int>
struct value : type_traits::op
Expand Down Expand Up @@ -301,6 +332,7 @@ namespace micro_os_plus::micro_test_plus
* in addition to the actual value, has an epsilon, to use the
* desired precision during comparisons.
* If missing, the default is 1 / (10^decimals).
* @headerfile micro-test-plus.h <micro-os-plus/micro-test-plus.h>
*/
template <class T>
struct value<T,
Expand Down

0 comments on commit f776b18

Please sign in to comment.