fprime/Fw/FilePacket/GTest/DataPacket.cpp
Thomas Boyer-Chammard ab58cf18fb
Format Fw and add to CI (#3976)
* Format Fw and add to CI

* Fix include of HPP file instead of H in extern C

* Fix format strings
2025-08-04 12:56:02 -07:00

31 lines
1019 B
C++

// ======================================================================
// \title Fw/FilePacket/GTest/DataPacket.cpp
// \author bocchino
// \brief Test utilities for data file packets
//
// \copyright
// Copyright (C) 2016, California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Fw/FilePacket/GTest/FilePackets.hpp>
#include <Fw/Types/GTest/Bytes.hpp>
namespace Fw {
namespace GTest {
void FilePackets::DataPacket ::compare(const FilePacket::DataPacket& expected, const FilePacket::DataPacket& actual) {
FilePackets::Header::compare(expected.asHeader(), actual.asHeader());
ASSERT_EQ(expected.getByteOffset(), actual.getByteOffset());
Bytes expectedData(expected.getData(), expected.getDataSize());
Bytes actualData(actual.getData(), actual.getDataSize());
Bytes::compare(expectedData, actualData);
}
} // namespace GTest
} // namespace Fw