BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bsls_asserttest_macroreset.h
Go to the documentation of this file.
1/// @file bsls_asserttest_macroreset.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bsls_asserttest_macroreset.h -*-C++-*-
8#ifndef INCLUDED_BSLS_ASSERTTEST_MACRORESET
9#define INCLUDED_BSLS_ASSERTTEST_MACRORESET
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bsls_asserttest_macroreset bsls_asserttest_macroreset
15/// @brief Undefine macros related to `bsls_asserttest.h`.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bsls
19/// @{
20/// @addtogroup bsls_asserttest_macroreset
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bsls_asserttest_macroreset-purpose"> Purpose</a>
25/// * <a href="#bsls_asserttest_macroreset-description"> Description </a>
26/// * <a href="#bsls_asserttest_macroreset-usage"> Usage </a>
27///
28/// # Purpose {#bsls_asserttest_macroreset-purpose}
29/// Undefine macros related to `bsls_asserttest.h`.
30///
31/// # Description {#bsls_asserttest_macroreset-description}
32/// This component provides a header that is *included* to undefine
33/// all macros defined in `bsls_asserttest.h`, `bsls_assert.h`, and
34/// `bsls_review.h`; it is designed to be *re*-includable. This is for the use
35/// of the @ref bsls_assertest test driver to enable it to re-include the
36/// `bsls_asserttest.h` header with different input macros and verify that they
37/// output the correct resulting macro definitions.
38///
39/// ## Usage {#bsls_asserttest_macroreset-usage}
40///
41///
42/// To undefine all macros defined in `bsls_asserttest.h`, `bsls_assert.h` and
43/// `bsls_review.h`, first disable the header include guard for this header
44/// (`bsls_asserttest_macroreset.h`):
45/// @code
46/// #undef INCLUDED_BSLS_ASSERTTEST_MACRORESET
47/// @endcode
48/// Then re-include this header, which will undefine the macros that were
49/// defined by `bsls_asserttest.h`, `bsls_assert.h` and `bsls_review.h`:
50/// @code
51/// #include <bsls_asserttest_macroreset.h>
52/// @endcode
53/// Then define any macros that control the behaviors of `bsls_asserttest.h`,
54/// `bsls_assert.h` and `bsls_review.h` for this particular test, then
55/// re-include `bsls_asserttest.h`:
56/// @code
57/// #include <bsls_asserttest.h>
58/// @endcode
59/// @}
60/** @} */
61/** @} */
62
63/** @addtogroup bsl
64 * @{
65 */
66/** @addtogroup bsls
67 * @{
68 */
69/** @addtogroup bsls_asserttest_macroreset
70 * @{
71 */
72
73// Undefine the external header guards so that the component headers can be
74// re-included and re-evaluated.
75#undef INCLUDED_BSLS_REVIEW
76#undef INCLUDED_BSLS_ASSERT
77#undef INCLUDED_BSLS_ASSERTTEST
78
79// Undefine the build mode so it can be set to whatever the test wants to
80// verify next.
81#undef BDE_BUILD_TARGET_DBG
82#undef BDE_BUILD_TARGET_OPT
83#undef BDE_BUILD_TARGET_SAFE
84#undef BDE_BUILD_TARGET_SAFE_2
85
86// Undefine the explicit review level and assert level macros.
87#undef BSLS_REVIEW_LEVEL_NONE
88#undef BSLS_REVIEW_LEVEL_REVIEW
89#undef BSLS_REVIEW_LEVEL_REVIEW_OPT
90#undef BSLS_REVIEW_LEVEL_REVIEW_SAFE
91
92#undef BSLS_ASSERT_LEVEL_ASSERT
93#undef BSLS_ASSERT_LEVEL_ASSERT_OPT
94#undef BSLS_ASSERT_LEVEL_ASSERT_SAFE
95#undef BSLS_ASSERT_LEVEL_ASSUME_ASSERT
96#undef BSLS_ASSERT_LEVEL_ASSUME_OPT
97#undef BSLS_ASSERT_LEVEL_ASSUME_SAFE
98#undef BSLS_ASSERT_LEVEL_NONE
99
100// Undefine the macros actually defined by 'bsls_review.h'.
101#undef BSLS_REVIEW
102#undef BSLS_REVIEW_REVIEW_IMP
103#undef BSLS_REVIEW_REVIEW_COUNT_IMP
104#undef BSLS_REVIEW_DISABLED_IMP
105#undef BSLS_REVIEW_INVOKE
106#undef BSLS_REVIEW_IS_ACTIVE
107#undef BSLS_REVIEW_IS_USED
108#undef BSLS_REVIEW_OPT
109#undef BSLS_REVIEW_OPT_IS_ACTIVE
110#undef BSLS_REVIEW_OPT_IS_USED
111#undef BSLS_REVIEW_OPT_UNREACHABLE
112#undef BSLS_REVIEW_SAFE
113#undef BSLS_REVIEW_SAFE_IS_ACTIVE
114#undef BSLS_REVIEW_SAFE_IS_USED
115#undef BSLS_REVIEW_SAFE_UNREACHABLE
116#undef BSLS_REVIEW_UNREACHABLE
117#undef BSLS_REVIEW_UNREACHABLE_DISABLED_IMP
118#undef BSLS_REVIEW_UNREACHABLE_IMP
119
120// Undefine other control macros
121#undef BSLS_REVIEW_VALIDATE_DISABLED_MACROS
122#undef BSLS_ASSERT_VALIDATE_DISABLED_MACROS
123#undef BSLS_ASSERTTEST_VALIDATE_DISABLED_MACROS
124
125// Undefine the macros actually defined by 'bsls_assert.h'.
126#undef BSLS_ASSERT
127#undef BSLS_ASSERT_ASSERT
128#undef BSLS_ASSERT_ASSUME_IMP
129#undef BSLS_ASSERT_ASSERT_IMP
130#undef BSLS_ASSERT_DISABLED_IMP
131#undef BSLS_ASSERT_INVOKE
132#undef BSLS_ASSERT_INVOKE_NORETURN
133#undef BSLS_ASSERT_IS_ACTIVE
134#undef BSLS_ASSERT_IS_ASSUMED
135#undef BSLS_ASSERT_IS_REVIEW
136#undef BSLS_ASSERT_IS_USED
137#undef BSLS_ASSERT_OPT
138#undef BSLS_ASSERT_OPT_IS_ACTIVE
139#undef BSLS_ASSERT_OPT_IS_ASSUMED
140#undef BSLS_ASSERT_OPT_IS_REVIEW
141#undef BSLS_ASSERT_OPT_IS_USED
142#undef BSLS_ASSERT_OPT_UNREACHABLE
143#undef BSLS_ASSERT_OPT_UNREACHABLE_IMP
144#undef BSLS_ASSERT_SAFE
145#undef BSLS_ASSERT_SAFE_IS_ACTIVE
146#undef BSLS_ASSERT_SAFE_IS_ASSUMED
147#undef BSLS_ASSERT_SAFE_IS_REVIEW
148#undef BSLS_ASSERT_SAFE_IS_USED
149#undef BSLS_ASSERT_SAFE_UNREACHABLE
150#undef BSLS_ASSERT_SAFE_UNREACHABLE_IMP
151#undef BSLS_ASSERT_UNREACHABLE
152#undef BSLS_ASSERT_UNREACHABLE_DISABLED_IMP
153#undef BSLS_ASSERT_UNREACHABLE_IMP
154
155// Undefine the macros actually defined by 'bsls_asserttest.h'.
156#undef BSLS_ASSERTTEST_SAFE_2_BUILD_FLAG
157#undef BSLS_ASSERTTEST_ASSERT_ACTIVE_FLAG
158#undef BSLS_ASSERTTEST_ASSERT_OPT_ACTIVE_FLAG
159#undef BSLS_ASSERTTEST_ASSERT_SAFE_ACTIVE_FLAG
160
161#undef BSLS_ASSERTTEST_ASSERT_FAIL
162#undef BSLS_ASSERTTEST_ASSERT_FAIL_RAW
163#undef BSLS_ASSERTTEST_ASSERT_OPT_FAIL
164#undef BSLS_ASSERTTEST_ASSERT_OPT_FAIL_RAW
165#undef BSLS_ASSERTTEST_ASSERT_SAFE_FAIL
166#undef BSLS_ASSERTTEST_ASSERT_SAFE_FAIL_RAW
167#undef BSLS_ASSERTTEST_ASSERT_INVOKE_FAIL
168#undef BSLS_ASSERTTEST_ASSERT_INVOKE_FAIL_RAW
169
170#undef BSLS_ASSERTTEST_ASSERT_PASS
171#undef BSLS_ASSERTTEST_ASSERT_PASS_RAW
172#undef BSLS_ASSERTTEST_ASSERT_OPT_PASS
173#undef BSLS_ASSERTTEST_ASSERT_OPT_PASS_RAW
174#undef BSLS_ASSERTTEST_ASSERT_SAFE_PASS
175#undef BSLS_ASSERTTEST_ASSERT_SAFE_PASS_RAW
176#undef BSLS_ASSERTTEST_ASSERT_INVOKE_PASS
177#undef BSLS_ASSERTTEST_ASSERT_INVOKE_PASS_RAW
178
179#undef BSLS_ASSERTTEST_BRUTE_FORCE_IMP
180#undef BSLS_ASSERTTEST_BRUTE_FORCE_IMP_RAW
181#undef BSLS_ASSERTTEST_DISABLED_IMP
182#undef BSLS_ASSERTTEST_IS_ACTIVE
183
184#undef BSLS_ASSERTTEST_CAN_CHECK_LEVELS
185#undef BSLS_ASSERTTEST_CHECK_LEVEL
186#undef BSLS_ASSERTTEST_CHECK_LEVEL_ARG
187
188#endif
189
190// ----------------------------------------------------------------------------
191// Copyright 2018 Bloomberg Finance L.P.
192//
193// Licensed under the Apache License, Version 2.0 (the "License");
194// you may not use this file except in compliance with the License.
195// You may obtain a copy of the License at
196//
197// http://www.apache.org/licenses/LICENSE-2.0
198//
199// Unless required by applicable law or agreed to in writing, software
200// distributed under the License is distributed on an "AS IS" BASIS,
201// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202// See the License for the specific language governing permissions and
203// limitations under the License.
204// ----------------------------- END-OF-FILE ----------------------------------
205
206/** @} */
207/** @} */
208/** @} */
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238