GCC Code Coverage Report


Directory: ./
File: src/phoenix_isOk.cpp
Date: 2024-11-14 16:05:39
Exec Total Coverage
Lines: 6 6 100.0%
Branches: 3 3 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 #include "phoenix_isOk.h"
9
10 ///Print OK or FAIL depending on the given boolean
11 /** @param b : boolean to be checked
12 * @return OK on true, FAIL on false
13 */
14 180 std::string phoenix_isOk(bool b){
15 180 const char* res[] = {"\033[31mFAIL\033[0m", "\033[32mOK\033[0m"};
16
1/1
✓ Branch 2 taken 180 times.
180 return std::string(res[b]);
17 }
18
19 ///Print the check function return
20 /** @param functionName : name of the function
21 * @param b : boolean to be checked
22 */
23 5 void phoenix_functionOk(const std::string & functionName, bool b){
24
2/2
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
5 std::cout << functionName << " : " << phoenix_isOk(b) << std::endl;
25 5 }
26
27