GCC Code Coverage Report


Directory: Fw/FilePacket/
File: GTest/DataPacket.cpp
Date: 2026-09-03 21:14:53
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 1 1 100.0%
Branches: 5 10 50.0%

Line Branch Exec Source
1 // ======================================================================
2 // \title Fw/FilePacket/GTest/DataPacket.cpp
3 // \author bocchino
4 // \brief Test utilities for data file packets
5 //
6 // \copyright
7 // Copyright (C) 2016, California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12
13 #include <Fw/FilePacket/GTest/FilePackets.hpp>
14 #include <Fw/Types/GTest/Bytes.hpp>
15
16 namespace Fw {
17
18 namespace GTest {
19
20 1 void FilePackets::DataPacket ::compare(const FilePacket::DataPacket& expected, const FilePacket::DataPacket& actual) {
21
1/1
✓ Branch 5 taken 1 times.
1 FilePackets::Header::compare(expected.asHeader(), actual.asHeader());
22
3/8
✓ Branch 10 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 25 not taken.
✗ Branch 29 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
1 ASSERT_EQ(expected.getByteOffset(), actual.getByteOffset());
23 1 Bytes expectedData(expected.getData(), expected.getDataSize());
24 1 Bytes actualData(actual.getData(), actual.getDataSize());
25
1/1
✓ Branch 1 taken 1 times.
1 Bytes::compare(expectedData, actualData);
26 }
27
28 } // namespace GTest
29
30 } // namespace Fw
31