GCC Code Coverage Report


Directory: ./
File: src/BackEnd/gitlab_doc.cpp
Date: 2025-12-15 11:32:44
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 1 1 100.0%
Branches: 21 21 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 "gitlab_doc.h"
9
10 ///Get the documentation url of the given project url if possible
11 /** @param projectUrl : url of the project to be used
12 * @return corresponding documentation url or empty string if it cannot be determined
13 */
14 3 PString getGitlabDocUrl(const PString & projectUrl){
15
1/1
✓ Branch 0 (2→3) taken 3 times.
3 PString docUrl;
16
4/4
✓ Branch 0 (3→4) taken 3 times.
✓ Branch 2 (4→5) taken 3 times.
✓ Branch 4 (6→7) taken 1 times.
✓ Branch 5 (6→8) taken 2 times.
3 if(!projectUrl.isSameBegining("https://gitlab")){
17 1 return docUrl;
18 }
19
1/1
✓ Branch 0 (8→9) taken 2 times.
2 PVecString vecSeparator(projectUrl.split('/'));
20
2/2
✓ Branch 0 (10→11) taken 1 times.
✓ Branch 1 (10→12) taken 1 times.
2 if(vecSeparator.size() < 5lu){
21 1 return docUrl;
22 }
23
9/9
✓ Branch 0 (13→14) taken 1 times.
✓ Branch 2 (14→15) taken 1 times.
✓ Branch 4 (15→16) taken 1 times.
✓ Branch 6 (17→18) taken 1 times.
✓ Branch 8 (18→19) taken 1 times.
✓ Branch 10 (19→20) taken 1 times.
✓ Branch 12 (20→21) taken 1 times.
✓ Branch 14 (21→22) taken 1 times.
✓ Branch 16 (22→23) taken 1 times.
1 docUrl += "https://" + vecSeparator[3lu].toLower() + ".pages" + vecSeparator[2lu].replace("gitlab", "") + "/";
24
2/2
✓ Branch 0 (38→32) taken 2 times.
✓ Branch 1 (38→39) taken 1 times.
3 for(size_t i(4lu); i < vecSeparator.size(); ++i){
25
2/2
✓ Branch 0 (33→34) taken 2 times.
✓ Branch 2 (34→35) taken 2 times.
2 docUrl += vecSeparator[i] + "/";
26 }
27 1 return docUrl;
28 2 }
29
30
31