GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
|||
2 |
/*************************************** |
||
3 |
Auteur : Pierre Aubert |
||
4 |
Mail : pierre.aubert@lapp.in2p3.fr |
||
5 |
Licence : CeCILL-C |
||
6 |
****************************************/ |
||
7 |
|||
8 |
#include "phoenix_assert.h" |
||
9 |
#include "phoenix_check.h" |
||
10 |
#include "dico_replace_var.h" |
||
11 |
#include "parser_yml.h" |
||
12 |
|||
13 |
///Check the replace of var in str |
||
14 |
1 |
void checkVarReplaceStr(){ |
|
15 |
1 |
PMapKnownVar mapKeyVariable; |
|
16 |
✓✓✓ | 1 |
mapKeyVariable["${varA}"] = "someStr"; |
17 |
✓✓✓ | 1 |
mapKeyVariable["${varB}"] = "otherStr"; |
18 |
|||
19 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty var begin end", dico_replace_var_str("input", mapKeyVariable, "", ""), "input")); |
20 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty var begin", dico_replace_var_str("input", mapKeyVariable, "", "}"), "input")); |
21 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty var end", dico_replace_var_str("input", mapKeyVariable, "${", ""), "input")); |
22 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty no replace", dico_replace_var_str("input", mapKeyVariable, "${", "}"), "input")); |
23 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty replace A", dico_replace_var_str("input ${varA}", mapKeyVariable, "${", "}"), "input someStr")); |
24 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty replace A B", dico_replace_var_str("input ${varA}${varB}", mapKeyVariable, "${", "}"), "input someStrotherStr")); |
25 |
✓✓✓✓ ✓✓✓✓ ✓✓✓ |
1 |
phoenix_assert(phoenix_check("base empty replace unexisting C", dico_replace_var_str("input ${varC}", mapKeyVariable, "${", "}"), "input ${varC}")); |
26 |
1 |
} |
|
27 |
|||
28 |
|||
29 |
1 |
int main(int argc, char** argv){ |
|
30 |
1 |
checkVarReplaceStr(); |
|
31 |
1 |
return 0; |
|
32 |
} |
||
33 |
|||
34 |
Generated by: GCOVR (Version 4.2) |