blob: 2225203e52037924f8f8a1ce5e91db3203017663 [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
9namespace blobs
10{
11namespace flash
12{
13namespace internal
14{
15
16class InternalSysMock : public Sys
17{
18 public:
19 virtual ~InternalSysMock() = default;
20
21 MOCK_CONST_METHOD2(open, int(const char*, int));
22 MOCK_CONST_METHOD1(close, int(int));
23 MOCK_CONST_METHOD6(mmap, void*(void*, size_t, int, int, int, off_t));
24 MOCK_CONST_METHOD2(munmap, int(void*, size));
25 MOCK_CONST_METHOD0(getpagesize, int());
Patrick Venture7b91cbc2018-11-28 14:24:41 -080026 MOCK_CONST_METHOD3(ioctl, int(int, unsigned long, void*));
Patrick Venture8b588562018-11-18 08:44:33 -080027};
28
29} // namespace internal
30} // namespace flash
31} // namespace blobs