blob: 86264a134bf1a9f10d1f67274a99fa869081f0cb [file] [log] [blame]
#include "ipmi_errors.hpp"
#include <gtest/gtest.h>
namespace host_tool
{
TEST(IpmiExceptionTest, VerifyTimedOutIsString)
{
/* Verify that throwing the exception with the cc code for timed out gets
* converted to the human readable string.
*/
bool verified = false;
try
{
throw IpmiException(0xc3);
}
catch (const IpmiException& i)
{
EXPECT_STREQ("Received IPMI_CC: timeout", i.what());
verified = true;
}
EXPECT_TRUE(verified);
}
} // namespace host_tool