Patrick Venture | bcec9c6 | 2018-12-14 13:58:41 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <cstdint> |
| 4 | #include <vector> |
| 5 | |
| 6 | #include <gmock/gmock.h> |
| 7 | |
| 8 | class CrcInterface |
| 9 | { |
| 10 | public: |
| 11 | virtual ~CrcInterface() = default; |
| 12 | |
| 13 | virtual std::uint16_t |
| 14 | generateCrc(const std::vector<std::uint8_t>& data) const = 0; |
| 15 | }; |
| 16 | |
| 17 | class CrcMock : public CrcInterface |
| 18 | { |
| 19 | public: |
| 20 | virtual ~CrcMock() = default; |
Willy Tu | f450486 | 2021-04-24 23:22:19 -0700 | [diff] [blame^] | 21 | MOCK_METHOD(std::uint16_t, generateCrc, (const std::vector<std::uint8_t>&), |
| 22 | (const, override)); |
Patrick Venture | bcec9c6 | 2018-12-14 13:58:41 -0800 | [diff] [blame] | 23 | }; |