GCC Code Coverage Report


Directory: ./
File: src/phoenix_clock_mock.cpp
Date: 2025-03-14 11:49:29
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_clock_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 concatenateVecTime(VecTime & vecOutput, const VecTime vecInput){
14
2/2
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 3 times.
6 for(VecTime::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 6 void splitVecTime(VecTime & vecOutput, const VecTime vecInput,
27 size_t offsetPart, size_t sizePart)
28 {
29 6 size_t maxIndex(std::min(offsetPart + sizePart, vecInput.size()));
30
2/2
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 6 times.
10 for(size_t i(offsetPart); i < maxIndex; ++i){
31 4 vecOutput.push_back(vecInput[i]);
32 }
33 6 }
34
35
36
37
38
39