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; |
| 24 | MOCK_CONST_METHOD1(generateCrc, |
| 25 | std::uint16_t(const std::vector<std::uint8_t>&)); |
| 26 | }; |
Patrick Venture | 1681f7f | 2019-03-07 12:59:29 -0800 | [diff] [blame] | 27 | |
| 28 | } // namespace ipmiblob |