Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "internal/sys.hpp" |
| 4 | |
| 5 | #include <unistd.h> |
| 6 | |
| 7 | #include <gmock/gmock.h> |
| 8 | |
Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 9 | namespace internal |
| 10 | { |
| 11 | |
| 12 | class InternalSysMock : public Sys |
| 13 | { |
| 14 | public: |
| 15 | virtual ~InternalSysMock() = default; |
| 16 | |
| 17 | MOCK_CONST_METHOD2(open, int(const char*, int)); |
Patrick Venture | cec0490 | 2019-01-15 13:04:44 -0800 | [diff] [blame] | 18 | MOCK_CONST_METHOD3(read, int(int, void*, std::size_t)); |
Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 19 | MOCK_CONST_METHOD1(close, int(int)); |
Patrick Venture | 28abae7 | 2018-12-14 09:44:02 -0800 | [diff] [blame] | 20 | MOCK_CONST_METHOD6(mmap, void*(void*, std::size_t, int, int, int, off_t)); |
| 21 | MOCK_CONST_METHOD2(munmap, int(void*, std::size_t)); |
Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 22 | MOCK_CONST_METHOD0(getpagesize, int()); |
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 23 | MOCK_CONST_METHOD3(ioctl, int(int, unsigned long, void*)); |
Patrick Venture | 7b78aa2 | 2018-12-14 13:56:15 -0800 | [diff] [blame] | 24 | MOCK_CONST_METHOD3(poll, int(struct pollfd*, nfds_t, int)); |
Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | } // namespace internal |