21#ifndef MOCKSYSCALLS_HPP
22#define MOCKSYSCALLS_HPP
25#include <gmock/gmock.h>
69inline int mock_open(
const char *path,
int flags, ...) {
80inline int mock_ioctl(
int fd,
unsigned long request, ...) {
int mock_ioctl(int fd, unsigned long request,...)
Mocked ioctl function.
int mock_close(int fd)
Mocked close function.
int mock_open(const char *path, int flags,...)
Mocked open function.
MockSysCalls(const MockSysCalls &)=delete
Copy constructor of the class set as delete.
MOCK_METHOD(int, close,(int fd),())
Mocked method to close a file.
~MockSysCalls()=default
Destructor of the class set as default.
MOCK_METHOD(int, ioctl,(int fd, unsigned long request),())
Mocked method to perform an I/O control operation.
MockSysCalls & operator=(const MockSysCalls &)=delete
Operator of the class set as delete.
MOCK_METHOD(int, open,(const char *path, int flags),())
Mocked method to open a file.
static MockSysCalls & instance()
Get the instance object.
MockSysCalls()=default
Constructor of the class set as default.