blob: 63c0b0ca4fc69976c607bbbad8e6f72fef4c4084 [file] [log] [blame]
Patrick Venture8b588562018-11-18 08:44:33 -08001#pragma once
2
3#include "internal/sys.hpp"
4
5#include <unistd.h>
6
7#include <gmock/gmock.h>
8
Patrick Venture8b588562018-11-18 08:44:33 -08009namespace internal
10{
11
12class InternalSysMock : public Sys
13{
14 public:
15 virtual ~InternalSysMock() = default;
16
17 MOCK_CONST_METHOD2(open, int(const char*, int));
18 MOCK_CONST_METHOD1(close, int(int));
Patrick Venture28abae72018-12-14 09:44:02 -080019 MOCK_CONST_METHOD6(mmap, void*(void*, std::size_t, int, int, int, off_t));
20 MOCK_CONST_METHOD2(munmap, int(void*, std::size_t));
Patrick Venture8b588562018-11-18 08:44:33 -080021 MOCK_CONST_METHOD0(getpagesize, int());
Patrick Venture7b91cbc2018-11-28 14:24:41 -080022 MOCK_CONST_METHOD3(ioctl, int(int, unsigned long, void*));
Patrick Venture7b78aa22018-12-14 13:56:15 -080023 MOCK_CONST_METHOD3(poll, int(struct pollfd*, nfds_t, int));
Patrick Venture8b588562018-11-18 08:44:33 -080024};
25
26} // namespace internal