Directory: | ./ |
---|---|
File: | src/phoenix_check_impl.h |
Date: | 2024-11-14 16:05:39 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 6 | 6 | 100.0% |
Branches: | 2 | 4 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /*************************************** | ||
2 | Auteur : Pierre Aubert | ||
3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
4 | Licence : CeCILL-C | ||
5 | ****************************************/ | ||
6 | |||
7 | #ifndef __PHOENIX_CHECK_IMPL_H__ | ||
8 | #define __PHOENIX_CHECK_IMPL_H__ | ||
9 | |||
10 | #include <iostream> | ||
11 | #include "phoenix_check.h" | ||
12 | |||
13 | ///Check two value | ||
14 | /** @param testName : name of the current test | ||
15 | * @param val : value to be checked | ||
16 | * @param reference : reference value | ||
17 | * @return true if var == reference, false otherwise | ||
18 | */ | ||
19 | template<typename T> | ||
20 | 37 | bool phoenix_check(const std::string & testName, const T & val, const T & reference){ | |
21 | 37 | bool b(val == reference); | |
22 |
2/4✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
|
37 | std::cout << "phoenix_check : " << testName << " => " << phoenix_isOk(b) << std::endl; |
23 | 37 | std::cout << "\t val = '"<<val<<"'" << std::endl; | |
24 | 37 | std::cout << "\treference = '"<<reference<<"'" << std::endl; | |
25 | 37 | return b; | |
26 | } | ||
27 | |||
28 | |||
29 | #endif | ||
30 |