Skip to main content

runner-options-inlines.h File

C++ header file with inline implementations for the µTest++ runner options. More...

Namespaces Index​

namespacemicro_os_plus

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

namespacemicro_test_plus

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

Description​

C++ header file with inline implementations for the µTest++ runner options.

This header provides the inline member function bodies for the runner_options class, separated from the class declaration in runner-options.h to enforce the project convention that declarations reside in headers and implementations reside in inline files.

All definitions reside within the micro_os_plus::micro_test_plus namespace.

This file is included by runner-options.h; the applications include micro-os-plus/micro-test-plus.h, not this file.

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
12// ----------------------------------------------------------------------------
13
31
32#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_INLINES_RUNNER_OPTIONS_INLINES_H_
33#define MICRO_OS_PLUS_MICRO_TEST_PLUS_INLINES_RUNNER_OPTIONS_INLINES_H_
34
35// ----------------------------------------------------------------------------
36
37#if defined(__cplusplus)
38
39// ----------------------------------------------------------------------------
40
41#if defined(__GNUC__)
42#pragma GCC diagnostic push
43
44#pragma GCC diagnostic ignored "-Waggregate-return"
45#if defined(__clang__)
46#pragma clang diagnostic ignored "-Wc++98-compat"
47#endif // defined(__clang__)
48#endif // defined(__GNUC__)
49
50// ============================================================================
51
53{
54 // ==========================================================================
55
61 inline runner_options&
63 {
64 runner_options copy{ other };
65 *this = std::move (copy);
66 return *this;
67 }
68
73 inline bool
74 runner_options::has_errors (void) const noexcept
75 {
76 return !errors_.empty ();
77 }
78
83 inline bool
85 {
86 return unknown_option_;
87 }
88
93 inline const std::vector<std::string>&
94 runner_options::errors (void) const noexcept
95 {
96 return errors_;
97 }
98
104 inline const std::vector<std::string>&
105 runner_options::arguments (void) const noexcept
106 {
107 return arguments_;
108 }
109
116 inline std::span<const std::string>
118 {
119 if (application_begin_ >= arguments_.size ())
120 {
121 return {};
122 }
123
124 return std::span<const std::string>{ arguments_ }.subspan (
126 }
127
128 // --------------------------------------------------------------------------
129} // namespace micro_os_plus::micro_test_plus
130
131// ----------------------------------------------------------------------------
132
133#if defined(__GNUC__)
134#pragma GCC diagnostic pop
135#endif // defined(__GNUC__)
136
137// ----------------------------------------------------------------------------
138
139#endif // defined(__cplusplus)
140
141// ----------------------------------------------------------------------------
142
143#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_INLINES_RUNNER_OPTIONS_INLINES_H_
144
145// ----------------------------------------------------------------------------

Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.