GCC Code Coverage Report


Directory: ./
File: src/configCheckValue_impl.h
Date: 2025-11-27 16:44:16
Exec Total Coverage
Lines: 9 9 100.0%
Functions: 2 2 100.0%
Branches: 4 4 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 #ifndef __CONFIGCHECKVALUE_IMPL_H__
8 #define __CONFIGCHECKVALUE_IMPL_H__
9
10 #include "configCheckValue.h"
11
12 ///Check if the given value is in the given boundaries
13 /** @param value : value to be checked
14 * @param minValue : minimum value boundary
15 * @param isMinInclusive : true if the minimum boundary is inclusive
16 * @param maxValue : maximum value boundary
17 * @param isMaxInclusive : true if the maximum boundary is inclusive
18 * @return true if the value is in the boundaries, false otherwise
19 */
20 template<typename T>
21 10 bool configCheckValue(T value, T minValue, bool isMinInclusive, T maxValue, bool isMaxInclusive){
22 10 bool b(true);
23
2/2
✓ Branch 0 (2→3) taken 7 times.
✓ Branch 1 (2→4) taken 3 times.
10 if(isMinInclusive){
24 7 b &= minValue <= value;
25 }else{
26 3 b &= minValue < value;
27 }
28
2/2
✓ Branch 0 (5→6) taken 7 times.
✓ Branch 1 (5→7) taken 3 times.
10 if(isMaxInclusive){
29 7 b &= maxValue >= value;
30 }else{
31 3 b &= maxValue > value;
32 }
33 10 return b;
34 }
35
36
37 #endif
38