GCC Code Coverage Report


Directory: ./
File: src/type_utils.cpp
Date: 2025-04-25 19:10:50
Exec Total Coverage
Lines: 7 7 100.0%
Branches: 9 9 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
8 #include "type_utils.h"
9
10 ///Say if a given type is a std::list
11 /** @param type : type of be checked
12 * @return true if the type is a std::list
13 */
14 39 bool generator_typeIsList(const PString & type){
15
1/1
✓ Branch 2 taken 39 times.
39 return type.isSameBegining("std::list");
16 }
17
18 ///Get the nested type inside a std::list
19 /** @param type : type of be used
20 * @return nested type in the std::list
21 */
22 14 PString generator_getListNestedType(const PString & type){
23
4/4
✓ Branch 1 taken 14 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 13 times.
✓ Branch 6 taken 1 times.
14 if(!generator_typeIsList(type)){return "";}
24
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 PString subType(type.substr(9lu));
25
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 return subType.eraseFirstLastChar("<> \t\n");
26 13 }
27
28
29
30