Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <cstdint> |
| 4 | #include <vector> |
| 5 | |
| 6 | #include <gmock/gmock.h> |
| 7 | |
Patrick Venture | 1681f7f | 2019-03-07 12:59:29 -0800 | [diff] [blame] | 8 | namespace ipmiblob |
| 9 | { |
| 10 | |
Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 11 | class CrcInterface |
| 12 | { |
| 13 | public: |
| 14 | virtual ~CrcInterface() = default; |
| 15 | |
| 16 | virtual std::uint16_t |
| 17 | generateCrc(const std::vector<std::uint8_t>& data) const = 0; |
| 18 | }; |
| 19 | |
| 20 | class CrcMock : public CrcInterface |
| 21 | { |
| 22 | public: |
| 23 | virtual ~CrcMock() = default; |
Willy Tu | 8da5f72 | 2021-04-24 16:30:50 -0700 | [diff] [blame^] | 24 | MOCK_METHOD(std::uint16_t, generateCrc, (const std::vector<std::uint8_t>&), |
| 25 | (const, override)); |
Patrick Venture | 123b5c0 | 2019-03-05 14:01:00 -0800 | [diff] [blame] | 26 | }; |
Patrick Venture | 1681f7f | 2019-03-07 12:59:29 -0800 | [diff] [blame] | 27 | |
| 28 | } // namespace ipmiblob |