Hello,
I am trying to create a fake for the ioctl function, but I'm getting the following error when compiling (but not linking) my test.cpp file:
$ g++ -c -I../ -I$GTEST_DIR/include/ test.cpp
test.cpp:12:22: error: 'ioctl' has not been declared
test.cpp:12:64: error: expected constructor, destructor, or type conversion before ';' token
Line 12 of the test.cpp file contains the following:
FAKE_VALUE_FUNC(int, ioctl, int, unsigned long, unsigned long*);
Every other fake function has been declared successfully, except for ioctl. They have all been written in the same manner. These functions were implemented in another file of my own, the only "system" function mocked is ioctl.
Is there a special way to mock system or basic functions like this one?
Hello, I am trying to create a fake for the ioctl function, but I'm getting the following error when compiling (but not linking) my test.cpp file: $ g++ -c -I../ -I$GTEST_DIR/include/ test.cpp test.cpp:12:22: error: 'ioctl' has not been declared test.cpp:12:64: error: expected constructor, destructor, or type conversion before ';' token
Line 12 of the test.cpp file contains the following: FAKE_VALUE_FUNC(int, ioctl, int, unsigned long, unsigned long*);
Every other fake function has been declared successfully, except for ioctl. They have all been written in the same manner. These functions were implemented in another file of my own, the only "system" function mocked is ioctl.
Is there a special way to mock system or basic functions like this one?
Thank you. Regards,