test: Replace the C++ MOCK_METHOD<n> macros with the new MOCK_METHOD
Change-Id: I5099c727e9e918f19fa61acc91ef75250ebc6fa6
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/tools/test/pciaccess_mock.hpp b/tools/test/pciaccess_mock.hpp
index 738a1b1..f93e1fd 100644
--- a/tools/test/pciaccess_mock.hpp
+++ b/tools/test/pciaccess_mock.hpp
@@ -10,23 +10,26 @@
class PciAccessMock : public PciAccess
{
public:
- MOCK_CONST_METHOD1(pci_id_match_iterator_create,
- struct pci_device_iterator*(const struct pci_id_match*));
- MOCK_CONST_METHOD1(pci_iterator_destroy, void(struct pci_device_iterator*));
- MOCK_CONST_METHOD1(pci_device_enable, void(struct pci_device*));
- MOCK_CONST_METHOD1(pci_device_next,
- struct pci_device*(struct pci_device_iterator*));
- MOCK_CONST_METHOD1(pci_device_probe, int(struct pci_device*));
- MOCK_CONST_METHOD3(pci_device_cfg_read_u8,
- int(struct pci_device* dev, std::uint8_t* data,
- pciaddr_t offset));
- MOCK_CONST_METHOD3(pci_device_cfg_write_u8,
- int(struct pci_device* dev, std::uint8_t data,
- pciaddr_t offset));
- MOCK_CONST_METHOD5(pci_device_map_range, int(struct pci_device*, pciaddr_t,
- pciaddr_t, unsigned, void**));
- MOCK_CONST_METHOD3(pci_device_unmap_range,
- int(struct pci_device*, void*, pciaddr_t));
+ MOCK_METHOD(struct pci_device_iterator*, pci_id_match_iterator_create,
+ (const struct pci_id_match*), (const, override));
+ MOCK_METHOD(void, pci_iterator_destroy, (struct pci_device_iterator*),
+ (const, override));
+ MOCK_METHOD(void, pci_device_enable, (struct pci_device*),
+ (const, override));
+ MOCK_METHOD(struct pci_device*, pci_device_next,
+ (struct pci_device_iterator*), (const, override));
+ MOCK_METHOD(int, pci_device_probe, (struct pci_device*), (const, override));
+ MOCK_METHOD(int, pci_device_cfg_read_u8,
+ (struct pci_device * dev, std::uint8_t* data, pciaddr_t offset),
+ (const, override));
+ MOCK_METHOD(int, pci_device_cfg_write_u8,
+ (struct pci_device * dev, std::uint8_t data, pciaddr_t offset),
+ (const, override));
+ MOCK_METHOD(int, pci_device_map_range,
+ (struct pci_device*, pciaddr_t, pciaddr_t, unsigned, void**),
+ (const, override));
+ MOCK_METHOD(int, pci_device_unmap_range,
+ (struct pci_device*, void*, pciaddr_t), (const, override));
};
} // namespace host_tool