GCC Code Coverage Report


Directory: ./
File: src/phoenix_mock.cpp
Date: 2025-03-14 11:54:19
Exec Total Coverage
Lines: 9 9 100.0%
Branches: 5 5 100.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include "phoenix_mock.h"
8
9 ///Concatenate vector of message into an other one
10 /** @param[out] vecOutput : vector of output message
11 * @param vecInput : vector to be concatenated into vecOutput
12 */
13 3 void concatenateVecMessage(std::vector<std::vector<char> > & vecOutput, const std::vector<std::vector<char> > vecInput){
14
2/2
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 3 times.
6 for(std::vector<std::vector<char> >::const_iterator it(vecInput.begin()); it != vecInput.end(); ++it){
15
1/1
✓ Branch 2 taken 3 times.
3 vecOutput.push_back(*it);
16 }
17
18 3 }
19
20 ///Split a vector of messages into an other
21 /** @param[out] vecOutput : output vector of messages
22 * @param vecInput : input vector of messages
23 * @param offsetPart : offset of the first message to be extracted in a split mock
24 * @param sizePart : size of each split part (number of messages in each part to be split)
25 */
26 10 void splitVecMessage(std::vector<std::vector<char> > & vecOutput, const std::vector<std::vector<char> > vecInput,
27 size_t offsetPart, size_t sizePart)
28 {
29 10 size_t maxIndex(std::min(offsetPart + sizePart, vecInput.size()));
30
2/2
✓ Branch 0 taken 10 times.
✓ Branch 1 taken 10 times.
20 for(size_t i(offsetPart); i < maxIndex; ++i){
31 10 vecOutput.push_back(vecInput[i]);
32 }
33 10 }
34
35
36
37
38
39