GCC Code Coverage Report


Directory: ./
File: TESTS/TEST_VARINT/main.cpp
Date: 2026-01-15 15:40:41
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 2 2 100.0%
Branches: 10 10 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_assert.h"
8 #include "phoenix_varint.h"
9
10 ///Test the varint computation
11 1 void testVarint(){
12 1 std::vector<char> message;
13
1/1
✓ Branch 0 (3→4) taken 1 times.
1 message.push_back(0b10010110);
14
1/1
✓ Branch 0 (4→5) taken 1 times.
1 message.push_back(0b00000001);
15 1 char * iter = message.data();
16
1/1
✓ Branch 0 (6→7) taken 1 times.
1 size_t value = phoenix_readVarInt(iter);
17
3/3
✓ Branch 0 (7→8) taken 1 times.
✓ Branch 2 (8→9) taken 1 times.
✓ Branch 4 (9→10) taken 1 times.
1 std::cout << "testVarint : value = " << value << std::endl;
18
4/4
✓ Branch 0 (12→13) taken 1 times.
✓ Branch 2 (15→16) taken 1 times.
✓ Branch 4 (18→19) taken 1 times.
✓ Branch 6 (19→20) taken 1 times.
5 phoenix_assert(value == 150lu);
19 1 }
20
21 1 int main(){
22 1 testVarint();
23 1 return 0;
24 }
25