Directory: | ./ |
---|---|
File: | tmp_project/PhoenixString/src/phoenix_isOk.cpp |
Date: | 2024-07-27 10:53:27 |
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 | 208 | std::string phoenix_isOk(bool b){ | |
15 | 208 | const char* res[] = {"\033[31mFAIL\033[0m", "\033[32mOK\033[0m"}; | |
16 |
1/1✓ Branch 2 taken 208 times.
|
208 | 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 | 6 | void phoenix_functionOk(const std::string & functionName, bool b){ | |
24 |
2/2✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
|
6 | std::cout << functionName << " : " << phoenix_isOk(b) << std::endl; |
25 | 6 | } | |
26 | |||
27 |