Macros | Functions | Variables
test_system_mocks.c File Reference
#include "test_system_mocks.h"
Include dependency graph for test_system_mocks.c:

Go to the source code of this file.

Macros

#define MOCK_SYSCALL(ret, name, ARG_TYPES, ARG_NAMES)
 

Functions

int __wrap_fcntl (int fd, int cmd,...)
 
void __wrap_freeaddrinfo (struct addrinfo *res)
 
int count_fcntl (int fd, int cmd, unsigned long arg)
 
void count_freeaddrinfo (struct addrinfo *res)
 

Variables

int(* fake_fcntl )(int fd, int cmd, unsigned long)=0
 
void(* fake_freeaddrinfo )(struct addrinfo *res)=0
 
int fcntl_calls = 0
 
int freeaddrinfo_calls = 0
 

Macro Definition Documentation

#define MOCK_SYSCALL (   ret,
  name,
  ARG_TYPES,
  ARG_NAMES 
)
Value:
ret(*fake_##name) ARG_TYPES = 0; \
ret __wrap_##name ARG_TYPES { \
if (fake_##name) { \
return fake_##name ARG_NAMES; \
} else { \
return -1; \
} \
} \
int name##_calls = 0; \
ret count_##name ARG_TYPES { \
name##_calls++; \
return 0; \
}

Definition at line 30 of file test_system_mocks.c.

Function Documentation

int __wrap_fcntl ( int  fd,
int  cmd,
  ... 
)

Definition at line 50 of file test_system_mocks.c.

void __wrap_freeaddrinfo ( struct addrinfo *  res)

Definition at line 70 of file test_system_mocks.c.

int count_fcntl ( int  fd,
int  cmd,
unsigned long  arg 
)

Definition at line 63 of file test_system_mocks.c.

void count_freeaddrinfo ( struct addrinfo *  res)

Definition at line 78 of file test_system_mocks.c.

Variable Documentation

int(* fake_fcntl) (int fd, int cmd, unsigned long)=0

Definition at line 49 of file test_system_mocks.c.

void(* fake_freeaddrinfo) (struct addrinfo *res)=0

Definition at line 69 of file test_system_mocks.c.

int fcntl_calls = 0

Definition at line 62 of file test_system_mocks.c.

int freeaddrinfo_calls = 0

Definition at line 77 of file test_system_mocks.c.



xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix
autogenerated on Sun Feb 3 2019 03:29:51