blob: f0378f7cb5355e58bdf8e8828e6f97da5d11f73b [file] [log] [blame]
Patrick Venture123b5c02019-03-05 14:01:00 -08001#pragma once
2
3#include <cstdint>
4#include <vector>
5
6#include <gmock/gmock.h>
7
Patrick Venture1681f7f2019-03-07 12:59:29 -08008namespace ipmiblob
9{
10
Patrick Venture123b5c02019-03-05 14:01:00 -080011class CrcInterface
12{
13 public:
14 virtual ~CrcInterface() = default;
15
Patrick Williamsd9309ef2025-02-01 08:23:03 -050016 virtual std::uint16_t generateCrc(
17 const std::vector<std::uint8_t>& data) const = 0;
Patrick Venture123b5c02019-03-05 14:01:00 -080018};
19
20class CrcMock : public CrcInterface
21{
22 public:
23 virtual ~CrcMock() = default;
Willy Tu8da5f722021-04-24 16:30:50 -070024 MOCK_METHOD(std::uint16_t, generateCrc, (const std::vector<std::uint8_t>&),
25 (const, override));
Patrick Venture123b5c02019-03-05 14:01:00 -080026};
Patrick Venture1681f7f2019-03-07 12:59:29 -080027
28} // namespace ipmiblob