summaryrefslogtreecommitdiffstats
path: root/liblog_clear_mask.c
blob: 4bd27ce57ecc8b40e1422e2ac234db38f9942714 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST

extern inline void liblog_clear_mask(struct liblog_context *);

#else

int
main(void)
{
	struct liblog_context ctx;

	ctx.logmask = ~0U;
	liblog_clear_mask(&ctx);
	ASSERT_EQ_UINT(ctx.logmask, 0U);

	ctx.logmask = 1U;
	liblog_clear_mask(&ctx);
	ASSERT_EQ_UINT(ctx.logmask, 0U);

	ctx.logmask = 0U;
	liblog_clear_mask(&ctx);
	ASSERT_EQ_UINT(ctx.logmask, 0U);

	return 0;
}

#endif