Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <unistd.h> |
| 4 | |
Patrick Venture | f9ee95f | 2021-02-12 12:33:31 -0800 | [diff] [blame] | 5 | #include <ipmiblob/internal/sys_interface.hpp> |
Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 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 | |
Willy Tu | 8da5f72 | 2021-04-24 16:30:50 -0700 | [diff] [blame] | 19 | MOCK_METHOD(int, open, (const char*, int), (const, override)); |
| 20 | MOCK_METHOD(int, read, (int, void*, std::size_t), (const, override)); |
| 21 | MOCK_METHOD(int, close, (int), (const, override)); |
| 22 | MOCK_METHOD(void*, mmap, (void*, std::size_t, int, int, int, off_t), |
| 23 | (const, override)); |
| 24 | MOCK_METHOD(int, munmap, (void*, std::size_t), (const, override)); |
| 25 | MOCK_METHOD(int, getpagesize, (), (const, override)); |
| 26 | MOCK_METHOD(int, ioctl, (int, unsigned long, void*), (const, override)); |
| 27 | MOCK_METHOD(int, poll, (struct pollfd*, nfds_t, int), (const, override)); |
Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace internal |
Patrick Venture | 6844833 | 2019-03-07 09:08:04 -0800 | [diff] [blame] | 31 | } // namespace ipmiblob |