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 | |||||
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; | ||||
21 | MOCK_CONST_METHOD1(generateCrc, | ||||
22 | std::uint16_t(const std::vector<std::uint8_t>&)); | ||||
23 | }; |