Deprecated
Definitions kept for compatibility with earlier releases. More...
Topics Index
| Operators | |
|
Deprecated overloaded operators for test comparisons. More... | |
| Old logical function names | |
|
Deprecated v5.0.1 names of the logical functions. More... | |
| Literals and wrappers | |
|
Deprecated literal operators and wrappers for typed operands. More... | |
Namespaces Index
| namespace | type_traits |
|
Deprecated v5.0.1 namespace of the concepts and of the value wrapper templates. More... | |
Classes Index
| struct | function_traits<T> |
|
Deprecated traits of the callable objects. More... | |
| struct | function_traits<R(*)(Args_T...)> |
|
Deprecated traits of the function pointers. More... | |
| struct | function_traits<R(Args_T...)> |
|
Deprecated traits of the function types. More... | |
| struct | function_traits<R(T::*)(Args_T...) const> |
|
Deprecated traits of the pointers to const member functions. More... | |
| struct | function_traits<R(T::*)(Args_T...)> |
|
Deprecated traits of the pointers to member functions. More... | |
| struct | identity<T, Extra> |
|
Deprecated identity type. More... | |
| struct | list<Types> |
|
Deprecated empty type list. More... | |
| class | timestamp |
|
Deprecated clock reading. More... | |
Concepts Index
| concept | has_epsilon |
|
Deprecated concept satisfied when T is a framework floating-point wrapper with a tolerance. More... | |
| concept | has_npos |
|
Deprecated concept satisfied when T provides a npos member. More... | |
| concept | has_value |
|
Deprecated concept satisfied when T has a member named value. More... | |
| concept | is_floating_point |
|
Deprecated concept satisfied when T is a floating-point type. More... | |
Typedefs Index
template <class T> | |
| using | genuine_integral_value = detail::value< T > |
|
Deprecated integral value wrapper. More... | |
| using | runner_totals = counters |
| using | static_runner = runner |
| using | subtest = test_case |
| using | timestamps = stopwatch |
template <class T> | |
| using | value_base_ = detail::value_base< T > |
|
Deprecated name of detail::value_base. More... | |
Functions Index
| const char * | short_name (const char *name) noexcept |
|
Deprecated extraction of the file name from a path. More... | |
template <class Lhs_T, class Rhs_T> | |
| constexpr bool | within_tolerance (const Lhs_T &lhs, const Rhs_T &rhs) |
|
Deprecated check whether two operands are equal within the tolerance of the floating-point wrappers. More... | |
Variables Index
| static constexpr bool | within_tolerance_result = true |
|
Deprecated result when the operands are within the tolerance. More... | |
| static constexpr bool | within_tolerance_result = false |
|
Deprecated result when the operands are within the tolerance. More... | |
| static constexpr bool | within_tolerance_result = true |
|
Deprecated result when the operands are within the tolerance. More... | |
| static constexpr bool | within_tolerance_result = false |
|
Deprecated result when the operands are within the tolerance. More... | |
| static constexpr bool | within_tolerance_result = true |
|
Deprecated result when the operands are within the tolerance. More... | |
| static constexpr bool | within_tolerance_result = false |
|
Deprecated result when the operands are within the tolerance. More... | |
Deprecated Functions Index
template <class T> | |
| constexpr T & | mut (const T &t) noexcept |
|
Deprecated generic mutator to remove const qualification from a reference. More... | |
Description
Definitions kept for compatibility with earlier releases.
The deprecated definitions are kept so that the tests written for the earlier releases still compile; they will be removed in a future major release. The compiler reports each use, with a message that names the replacement and the version that deprecated it (most of them since 6.0.0).
- Availability
The deprecated definitions exist only when the application defines the macro MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED (see Configuration). Without it, the tests that still use them do not compile, which shows what remains to be migrated.
- Migration
Build once with the macro defined and the deprecation warnings enabled, and rewrite each reported use as its message suggests. While migrating, the applications that build with -Werror can disable the warnings temporarily with -Wno-deprecated-declarations.
- Deprecated groups
-
Three groups of deprecated definitions have topics of their own:
- the overloaded comparison and logical operators (see Operators), replaced by the function comparators and the logical functions;
- the user-defined literals and the value wrappers (see Literals and wrappers), replaced by the plain values passed to the function comparators;
- the logical functions _and(), _or(), and _not() (see Old logical function names), replaced by all_of(), any_of(), and negate().
- Other deprecated definitions
-
- the v5.0.1 names of the classes: static_runner (replaced by runner), subtest (replaced by test_case), detail::runner_totals (replaced by counters), and detail::timestamps and detail::timestamp, which are internal and not replaced;
- runner (const char*), replaced by runner() followed by add_top_suite() (since 4.1.0);
- runner::initialise (argc, argv, top_suite_name), replaced by initialise (argc, argv) followed by add_top_suite();
- runner::exit_code(), replaced by runner::run_suites();
- runner::suite(), replaced by runner::add_suite();
- runner::suites_count(), replaced by added_suites_count() or total_suites_count();
- runner::verbosity(), and runner::reporter() with its verbosity() member, replaced by runner::verbosity_level();
- runner::timings() and suite::timings(), and the members of detail::stopwatch kept from the v5.0.1 timestamps, which are internal and not replaced;
- the counters members successful_checks(), executed_subtests(), and was_successful(), replaced by passed_checks(), executed_test_cases(), and passed() (the deprecated mutators increment_successful_checks() and increment_executed_subtests() were removed, since the counters are updated only by the framework);
- test_case::assume(), replaced by test_case::require();
- the overloads of test_case::expect() and test_case::require() that accept an argument that is always true (a string literal or a function name), replaced by writing the condition;
- the static_suite constructor whose callable takes a static_suite&, replaced by a callable taking a suite&;
- mut(), replaced by const_cast<T&>;
- runner::name(), which always returned "runner", not replaced: the names in the reports are those of the suites (see add_top_suite());
- detail::expression_formatter::c_str() and empty(), replaced by str().c_str() and str().empty();
- the members children_subtests_count(), current_subtest_index(), and own_index() of the test nodes, which are internal and not replaced;
- extension::has_epsilon, the concept that detects the floating-point wrappers with a tolerance, to be removed with them;
- reflection::short_name(), replaced by utility::extract_file_name();
- the type_traits namespace, with the concepts and the value wrapper templates of v5.0.1, replaced by the extension namespace;
- the traits of the type_traits namespace: function_traits and list, which are not replaced, and identity, replaced by std::type_identity.
Typedefs
genuine_integral_value
|
Deprecated integral value wrapper.
- Template Parameters
-
T The integral type of the stored value.
In v5.0.1, a separate wrapper with the same members as value<T>, never created by the framework; now value<T>, so the values are compared and reported in the same way.
- Deprecated
-
the value wrappers are internal (since 6.0.0)
Definition at line 2823 of file deprecated.h.
runner_totals
|
Deprecated name of counters.
The v5.0.1 name of the class returned by totals(), renamed since the suites and the test cases own one too, not only the runner.
- Deprecated
-
use counters (since 6.0.0)
Definition at line 2295 of file deprecated.h.
static_runner
|
Deprecated name of runner.
The runner also runs the static_suite objects that refer to it, so a separate runner class is no longer needed.
- Deprecated
-
use runner (since 6.0.0)
Definition at line 2250 of file deprecated.h.
subtest
|
Deprecated name of test_case.
The v5.0.1 name of the class passed to the test case bodies, kept for the functions and the lambdas that name it as the type of their first parameter (void f (mt::subtest& t)); the lambdas with an auto& parameter are not affected.
- Deprecated
-
use test_case (since 6.0.0)
Definition at line 2237 of file deprecated.h.
timestamps
|
Deprecated name of stopwatch.
The v5.0.1 name of the class returned by the timings() functions of the runner and of the suites, which kept the two timestamps of the measured interval. Its public members are kept, on stopwatch; its protected members, the two optional timestamp objects, are not. The timings are internal; the elapsed times are shown by the reporters.
- Deprecated
-
the timings are internal (since 6.0.0)
Definition at line 2312 of file deprecated.h.
value_base_
|
Deprecated name of detail::value_base.
- Template Parameters
-
T The type of the stored value.
The v5.0.1 name, with a trailing underscore. The stored value is now private, and get() returns a reference; the value is read with get() or with the explicit conversion, not through the v5.0.1 public member value_.
- Deprecated
-
the value wrappers are internal (since 6.0.0)
Definition at line 2807 of file deprecated.h.
Functions
short_name()
| nodiscard noexcept |
Deprecated extraction of the file name from a path.
Forwards to utility::extract_file_name(), which the framework uses internally; it is kept only for compatibility with the existing applications.
- Parameters
-
name The path, as a C-string.
- Returns
A pointer to the file name within the input string, after the last / or backslash separator, or the string itself if there is no separator.
- Deprecated
-
use utility::extract_file_name() (since 6.0.0)
Delegates to utility::extract_file_name(), the single implementation used by the framework, so both the / and the backslash separators are recognised. If no separator is present, the original input string is returned.
Definition at line 78 of file deprecated.cpp.
References micro_os_plus::micro_test_plus::utility::extract_file_name and micro_os_plus::micro_test_plus::reflection::short_name.
Referenced by micro_os_plus::micro_test_plus::reflection::short_name.
within_tolerance()
| nodiscard constexpr |
Deprecated check whether two operands are equal within the tolerance of the floating-point wrappers.
Used by compare_op for all six tags, so that a value within the tolerance is equal, and neither less nor greater; at least one operand must have an epsilon member (a floating-point literal, a to_f, to_d, or to_ld wrapper, or approx()).
Used only by the deprecated floating-point wrappers, it is available only when MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED is defined.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
- Template Parameters
-
Lhs_T The type of the left-hand operand.
Rhs_T The type of the right-hand operand.
- Parameters
-
lhs The left-hand operand.
rhs The right-hand operand.
- Return Values
-
true The absolute difference is less than the tolerance (the smaller one, if both operands have one).
false Otherwise.
The tolerance is the smaller epsilon of the two operands, if both have one, otherwise the epsilon of the operand that has one. The operands are equal when the absolute value of their difference is less than the tolerance.
Definition at line 212 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::math::abs, micro_os_plus::micro_test_plus::detail::math::min_value, micro_os_plus::micro_test_plus::detail::unwrap and micro_os_plus::micro_test_plus::detail::within_tolerance.
Referenced by micro_os_plus::micro_test_plus::detail::compare_op< Lhs_T, Rhs_T, Compare_T >::compare_op and micro_os_plus::micro_test_plus::detail::within_tolerance.
Variables
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 468 of file detail.h.
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal, not ordered.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 586 of file detail.h.
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 645 of file detail.h.
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal, not ordered.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 704 of file detail.h.
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 763 of file detail.h.
within_tolerance_result
| constexpr static |
Deprecated result when the operands are within the tolerance.
Values within the tolerance are equal.
Used only by the tolerance of the deprecated floating-point wrappers.
- Deprecated
-
to be removed with the deprecated floating-point wrappers (since 6.0.0)
Definition at line 527 of file detail.h.
Deprecated Functions
mut()
| nodiscard constexpr noexcept |
Deprecated generic mutator to remove const qualification from a reference.
Not used by the framework. Equivalent to const_cast<T&> (t), which replaces it.
Modifying an object that was originally declared as const through the returned reference is undefined behaviour.
- Template Parameters
-
T The type of the input object.
- Parameters
-
t The object from which to remove const qualification.
- Returns
A non-const reference to the input object.
- Deprecated
-
use const_cast<T&> (since 6.0.0)
Removes the const qualifier from the reference with const_cast.
Definition at line 725 of file deprecated-inlines.h.
Reference micro_os_plus::micro_test_plus::mut.
Referenced by micro_os_plus::micro_test_plus::mut.
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.