blob: d815d1122c623f5ec81f4d59c1313c31d0a08e9e [file] [log] [blame]
Patrick Venture123b5c02019-03-05 14:01:00 -08001#pragma once
2
3#include <unistd.h>
4
Patrick Venturef9ee95f2021-02-12 12:33:31 -08005#include <ipmiblob/internal/sys_interface.hpp>
Patrick Venture123b5c02019-03-05 14:01:00 -08006
7#include <gmock/gmock.h>
8
Patrick Venture68448332019-03-07 09:08:04 -08009namespace ipmiblob
10{
Patrick Venture123b5c02019-03-05 14:01:00 -080011namespace internal
12{
13
14class InternalSysMock : public Sys
15{
16 public:
17 virtual ~InternalSysMock() = default;
18
Willy Tu8da5f722021-04-24 16:30:50 -070019 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 Venture123b5c02019-03-05 14:01:00 -080028};
29
30} // namespace internal
Patrick Venture68448332019-03-07 09:08:04 -080031} // namespace ipmiblob