Motr
M0
assert.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017-2020 Seagate Technology LLC and/or its Affiliates
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* For any questions about this software or licensing,
17
* please email opensource@seagate.com or cortx-questions@seagate.com.
18
*
19
*/
20
21
22
#include "
lib/assert.h
"
/* m0_failed_condition */
23
#include "
lib/string.h
"
/* m0_streq */
24
#include "
ut/ut.h
"
25
26
void
test_0C
(
void
)
27
{
28
M0_UT_ASSERT
(
m0_failed_condition
==
NULL
);
29
M0_UT_ASSERT
(!
_0C
(
true
&&
_0C
(
false
)));
30
M0_UT_ASSERT
(
m0_streq
(
m0_failed_condition
,
"false"
));
31
M0_UT_ASSERT
(
_0C
(
true
));
32
M0_UT_ASSERT
(
m0_failed_condition
==
NULL
);
33
}
ut.h
NULL
#define NULL
Definition:
misc.h:38
string.h
m0_failed_condition
M0_INTERNAL const char * m0_failed_condition
Definition:
misc.c:224
assert.h
m0_streq
#define m0_streq(a, b)
Definition:
string.h:34
test_0C
void test_0C(void)
Definition:
assert.c:26
_0C
#define _0C(exp)
Definition:
assert.h:311
M0_UT_ASSERT
#define M0_UT_ASSERT(a)
Definition:
ut.h:46
lib
ut
assert.c
Generated on Thu Apr 14 2022 14:02:56 for Motr by
1.8.14