blob: 4f4f57a4b5b571a59b6623380dde58eb6d24c99c [file] [log] [blame]
Patrick Venturea62466c2021-02-08 14:55:18 -08001#include "FruUtils.hpp"
2
3#include <array>
4
5#include "gtest/gtest.h"
6
7extern "C"
8{
9// Include for I2C_SMBUS_BLOCK_MAX
10#include <linux/i2c.h>
11}
12
13TEST(ValidateHeaderTest, InvalidFruVersionReturnsFalse)
14{
15 // Validates the FruVersion is checked for the only legal value.
16 constexpr std::array<uint8_t, I2C_SMBUS_BLOCK_MAX> fru_header = {
17 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
18
19 EXPECT_FALSE(validateHeader(fru_header));
20}