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