blob: e717c744ff0bb811a284d38e4d7cdd9f047f366b [file] [log] [blame]
Benjamin Fair20a18092020-06-08 11:12:21 -07001#pragma once
2
3#include "pciaccess.hpp"
4
5#include <gmock/gmock.h>
6
7namespace host_tool
8{
9
10class PciAccessMock : public PciAccess
11{
12 public:
13 MOCK_CONST_METHOD1(pci_id_match_iterator_create,
14 struct pci_device_iterator*(const struct pci_id_match*));
15 MOCK_CONST_METHOD1(pci_iterator_destroy, void(struct pci_device_iterator*));
16 MOCK_CONST_METHOD1(pci_device_next,
17 struct pci_device*(struct pci_device_iterator*));
18 MOCK_CONST_METHOD1(pci_device_probe, int(struct pci_device*));
19 MOCK_CONST_METHOD5(pci_device_map_range, int(struct pci_device*, pciaddr_t,
20 pciaddr_t, unsigned, void**));
21 MOCK_CONST_METHOD3(pci_device_unmap_range,
22 int(struct pci_device*, void*, pciaddr_t));
23};
24
25} // namespace host_tool