blob: 4f4f57a4b5b571a59b6623380dde58eb6d24c99c [file] [log] [blame]
#include "FruUtils.hpp"
#include <array>
#include "gtest/gtest.h"
extern "C"
{
// Include for I2C_SMBUS_BLOCK_MAX
#include <linux/i2c.h>
}
TEST(ValidateHeaderTest, InvalidFruVersionReturnsFalse)
{
// Validates the FruVersion is checked for the only legal value.
constexpr std::array<uint8_t, I2C_SMBUS_BLOCK_MAX> fru_header = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
EXPECT_FALSE(validateHeader(fru_header));
}