Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-strlen.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
6
#ifndef __MOCK_STRLEN_H__
7
#define __MOCK_STRLEN_H__
8
9
#include <stdbool.h>
10
#include <string.h>
11
20
size_t
__wrap_strlen
(
const
char
*s);
// NOLINT(readability-identifier-naming)
21
// Rationale: Naming scheme fixed due to linker wrapping.
22
23
/*
24
* Prototype for the genuine strlen function provided by the linker
25
*/
26
size_t
__real_strlen
(
const
char
*s);
// NOLINT(readability-identifier-naming)
27
// Rationale: Naming scheme fixed due to linker wrapping.
28
/*
29
* Define if strlen is used as mock or if strlen forwards to __real_strlen.
30
* true - mocking enabled , no real strlen is called
31
* false - all calls are forwarded to __real_strlen aka `strlen`
32
*/
33
extern
bool
crinitMockStrlenEnabled
;
34
#endif
/* __MOCK_STRLEN_H__ */
__wrap_strlen
size_t __wrap_strlen(const char *s)
Definition
mock-strlen.c:14
__real_strlen
size_t __real_strlen(const char *s)
crinitMockStrlenEnabled
bool crinitMockStrlenEnabled
Definition
mock-strlen.c:10
test
utest
mocks
mock-strlen.h
Generated by
1.9.8