File containing Mock classes to test the system calls. More...
#include <fcntl.h>
#include <gmock/gmock.h>
#include <sys/ioctl.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
class | MockSysCalls |
Class to emulate the behavior of the system calls. More... | |
Functions | |
int | mock_open (const char *path, int flags,...) |
Mocked open function. | |
int | mock_ioctl (int fd, unsigned long request,...) |
Mocked ioctl function. | |
int | mock_close (int fd) |
Mocked close function. | |
File containing Mock classes to test the system calls.
This file provides a mock implementation of system calls for testing purposes. It uses Google Mock to create mock methods for open, ioctl, and close system calls.
Definition in file MockSysCalls.hpp.
|
inline |
Mocked close function.
fd | The file descriptor. |
int |
Definition at line 90 of file MockSysCalls.hpp.
|
inline |
Mocked ioctl function.
fd | The file descriptor. |
request | The request code. |
int |
Definition at line 80 of file MockSysCalls.hpp.
|
inline |
Mocked open function.
path | The path to the file to open. |
flags | The flags for opening the file. |
int |
Definition at line 69 of file MockSysCalls.hpp.