GCC Code Coverage Report


Directory: ./
File: TESTS/TEST_LIST_FUNCTION/main.cpp
Date: 2025-11-27 16:25:51
Exec Total Coverage
Lines: 13 13 100.0%
Functions: 2 2 100.0%
Branches: 12 12 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 <iostream>
8
9 #include "phoenix_dl.h"
10
11 ///Test function mangling
12 /** @return true on success, false otherwise
13 */
14 1 bool testListFunction(){
15
1/1
✓ Branch 0 (4→5) taken 1 times.
1 std::string libraryFile(TEST_LIBRARY_FILE);
16
17 1 std::vector<std::string> vecFunction;
18
2/2
✓ Branch 0 (9→10) taken 1 times.
✓ Branch 2 (10→11) taken 1 times.
2 phoenix_listLibrarySymbol(vecFunction, "");
19
2/2
✓ Branch 0 (15→16) taken 1 times.
✓ Branch 2 (16→17) taken 1 times.
1 phoenix_listLibrarySymbol(vecFunction, "someInexistingFile.so");
20
1/1
✓ Branch 0 (19→20) taken 1 times.
1 phoenix_listLibrarySymbol(vecFunction, libraryFile);
21
22
2/2
✓ Branch 0 (37→21) taken 37 times.
✓ Branch 1 (37→38) taken 1 times.
76 for(std::vector<std::string>::iterator it(vecFunction.begin()); it != vecFunction.end(); ++it){
23
4/4
✓ Branch 0 (21→22) taken 37 times.
✓ Branch 2 (24→25) taken 37 times.
✓ Branch 4 (25→26) taken 37 times.
✓ Branch 6 (26→27) taken 37 times.
74 std::cout << "Found function '"<<(*it)<<"'" << std::endl;
24 }
25
26 1 return true;
27 1 }
28
29
30 1 int main(int argc, char** argv){
31 1 bool b(testListFunction());
32
33 1 return b - 1;
34 }
35
36