PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
main.cpp File Reference
#include "phoenix_assert.h"
#include "phoenix_check.h"
#include "dico_replace_var.h"
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

void checkVarReplaceStr ()
 Check the replace of var in str. More...
 
int main (int argc, char **argv)
 

Function Documentation

◆ checkVarReplaceStr()

void checkVarReplaceStr ( )

Check the replace of var in str.

Definition at line 13 of file main.cpp.

13  {
14  PMapKnownVar mapKeyVariable;
15  mapKeyVariable["${varA}"] = "someStr";
16  mapKeyVariable["${varB}"] = "otherStr";
17 
18  phoenix_assert(phoenix_check("base empty var begin end", dico_replace_var_str("input", mapKeyVariable, "", ""), "input"));
19  phoenix_assert(phoenix_check("base empty var begin", dico_replace_var_str("input", mapKeyVariable, "", "}"), "input"));
20  phoenix_assert(phoenix_check("base empty var end", dico_replace_var_str("input", mapKeyVariable, "${", ""), "input"));
21  phoenix_assert(phoenix_check("base empty no replace", dico_replace_var_str("input", mapKeyVariable, "${", "}"), "input"));
22  phoenix_assert(phoenix_check("base empty replace A", dico_replace_var_str("input ${varA}", mapKeyVariable, "${", "}"), "input someStr"));
23  phoenix_assert(phoenix_check("base empty replace A B", dico_replace_var_str("input ${varA}${varB}", mapKeyVariable, "${", "}"), "input someStrotherStr"));
24  phoenix_assert(phoenix_check("base empty replace unexisting C", dico_replace_var_str("input ${varC}", mapKeyVariable, "${", "}"), "input ${varC}"));
25 }
PString dico_replace_var_str(const PString &baseStr, const PMapKnownVar &mapKeyVariable, const PString &varBegin, const PString &varEnd)
Update the suffix of the file.
std::map< PString, PString > PMapKnownVar
Map of known variables.
#define phoenix_assert(isOk)
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.

References dico_replace_var_str(), phoenix_assert, and phoenix_check().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 28 of file main.cpp.

28  {
30  return 0;
31 }
void checkVarReplaceStr()
Check the replace of var in str.
Definition: main.cpp:13

References checkVarReplaceStr().

+ Here is the call graph for this function: