diff options
| author | Patrick Venture <venture@google.com> | 2019-03-07 12:59:29 -0800 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2019-03-07 13:03:28 -0800 |
| commit | 1681f7ff9fe112a0c3c318d562f4b46489eea02c (patch) | |
| tree | 7001687311705aa89fd695b17100babdd2d5b555 /test | |
| parent | 465469d1c074825462a7911ce1ea313230de98ce (diff) | |
| download | ipmi-blob-tool-1681f7ff9fe112a0c3c318d562f4b46489eea02c.tar.gz ipmi-blob-tool-1681f7ff9fe112a0c3c318d562f4b46489eea02c.zip | |
install crc_mock header
Install the crc_mock header for use in unit-tests in projects leveraging
this implementation of CRC.
Change-Id: Ia84caedb51e125ff3b051f93470990e44ff2540d
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/crc_mock.hpp | 23 | ||||
| -rw-r--r-- | test/tools_blob_unittest.cpp | 3 |
2 files changed, 1 insertions, 25 deletions
diff --git a/test/crc_mock.hpp b/test/crc_mock.hpp deleted file mode 100644 index 293ec24..0000000 --- a/test/crc_mock.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include <cstdint> -#include <vector> - -#include <gmock/gmock.h> - -class CrcInterface -{ - public: - virtual ~CrcInterface() = default; - - virtual std::uint16_t - generateCrc(const std::vector<std::uint8_t>& data) const = 0; -}; - -class CrcMock : public CrcInterface -{ - public: - virtual ~CrcMock() = default; - MOCK_CONST_METHOD1(generateCrc, - std::uint16_t(const std::vector<std::uint8_t>&)); -}; diff --git a/test/tools_blob_unittest.cpp b/test/tools_blob_unittest.cpp index 6e35920..e958630 100644 --- a/test/tools_blob_unittest.cpp +++ b/test/tools_blob_unittest.cpp @@ -1,6 +1,5 @@ -#include "crc_mock.hpp" - #include <ipmiblob/blob_handler.hpp> +#include <ipmiblob/test/crc_mock.hpp> #include <ipmiblob/test/ipmi_interface_mock.hpp> #include <gtest/gtest.h> |

