Skip to main content

deprecated.cpp File

C++ source file with implementations for the deprecated µTest++ definitions. More...

Included Headers​

Namespaces Index​

namespacemicro_os_plus

The primary namespace for the µOS++ framework. More...

namespacemicro_test_plus

Primary namespace for the µTest++ testing framework. More...

namespacedetail

Internal implementation details for the µTest++ framework. More...

namespacereflection

Reflection utilities for the µTest++ testing framework. More...

Functions Index​

const char *short_name (const char *name) noexcept

Deprecated extraction of the file name from a path. More...

Description​

C++ source file with implementations for the deprecated µTest++ definitions.

This source file contains the non-inline definitions of the deprecated definitions declared in deprecated.h:

  • reflection::short_name(), which extracts the base file name from a fully qualified path, by delegating to utility::extract_file_name();
  • the constructor of detail::timestamp that reads the system clock, with detail::read_clock(), the same clock as detail::stopwatch.

All definitions reside within the micro_os_plus::micro_test_plus namespace.

The definitions are compiled only when MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED is defined.

This file must be included when building the µTest++ library.

File Listing​

The file content with the documentation metadata removed is:

1/*
2 * This file is part of the µOS++ project (https://micro-os-plus.github.io/).
3 * Copyright (c) 2021-2026 Liviu Ionescu. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose is hereby granted, under the terms of the MIT license.
7 *
8 * If a copy of the license was not distributed with this file, it can be
9 * obtained from https://opensource.org/licenses/mit.
10 *
11 * Major parts of the code are inspired from v1.1.8 of the Boost UT project,
12 * released under the terms of the Boost Version 1.0 Software License,
13 * which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
14 */
15
16// ----------------------------------------------------------------------------
17
39
40// ----------------------------------------------------------------------------
41
45
46// ----------------------------------------------------------------------------
47
48#if defined(__GNUC__)
49#if defined(__clang__)
50#pragma clang diagnostic ignored "-Wc++98-compat"
51#endif // defined(__clang__)
52#endif // defined(__GNUC__)
53
54// ============================================================================
55
56#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_ENABLED) \
57 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
58
59// ----------------------------------------------------------------------------
60
62{
63 // --------------------------------------------------------------------------
64
65 namespace reflection
66 {
67 // ------------------------------------------------------------------------
68
76 // Deprecated since 6.0.0; use utility::extract_file_name().
77 const char*
78 short_name (const char* name) noexcept
79 {
80 return utility::extract_file_name (name);
81 }
82
83 // ------------------------------------------------------------------------
84 } // namespace reflection
85
86 // --------------------------------------------------------------------------
87
88 namespace detail
89 {
90 // ========================================================================
91
98 // Deprecated since 6.0.0, as the whole `timestamp` class; the timings are
99 // internal.
100 timestamp::timestamp (void) noexcept
101 {
103 }
104
105 // ------------------------------------------------------------------------
106 } // namespace detail
107
108 // --------------------------------------------------------------------------
109} // namespace micro_os_plus::micro_test_plus
110
111// ----------------------------------------------------------------------------
112
113#endif /* defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_ENABLED) \
114 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED) */
115
116// ----------------------------------------------------------------------------

Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.