xref: /openbmc/google-ipmi-sys/test/helper.hpp (revision ff3cd8e9)
1 #pragma once
2 
3 #include "handler_mock.hpp"
4 
5 #include <ipmid/api-types.hpp>
6 #include <span>
7 #include <utility>
8 
9 #include <gtest/gtest.h>
10 
11 namespace google
12 {
13 namespace ipmi
14 {
15 
16 // Validate the return code and the data for the IPMI reply.
17 // Returns the subcommand and the optional informations.
18 std::pair<std::uint8_t, std::vector<std::uint8_t>>
19     ValidateReply(::ipmi::RspType<std::uint8_t, std::vector<uint8_t>> reply,
20                   bool hasData = true);
21 
22 } // namespace ipmi
23 } // namespace google
24