PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
phoenix_check.cpp File Reference
#include "phoenix_check.h"
+ Include dependency graph for phoenix_check.cpp:

Go to the source code of this file.

Functions

bool phoenix_check (const std::string &testName, const std::list< std::string > &listVal, const std::list< std::string > &listRef)
 Check two list of string. More...
 
bool phoenix_check (const std::string &testName, const std::string &val, const std::string &reference)
 Check two string. More...
 

Function Documentation

◆ phoenix_check() [1/2]

bool phoenix_check ( const std::string &  testName,
const std::list< std::string > &  listVal,
const std::list< std::string > &  listRef 
)

Check two list of string.

Parameters
testName: name of the current test
listVal: list of std::string to be checked
listRef: list of reference std::string
Returns
true if val == reference, false otherwise

Definition at line 31 of file phoenix_check.cpp.

31  {
32  bool b(true);
33  //On this implementation, two list of different sizes are not comparable
34  b &= phoenix_check(testName + " size", listVal.size(), listRef.size());
35  std::list<std::string>::const_iterator itVal(listVal.begin());
36  std::list<std::string>::const_iterator itRef(listRef.begin());
37  size_t i(0lu);
38  while(itVal != listVal.end() && itRef != listRef.end() && b){
39  b &= phoenix_check(testName + " str("+valueToString(i)+")", *itVal, *itRef);
40  ++itVal;
41  ++itRef;
42  ++i;
43  }
44  return b;
45 }
std::string valueToString(const T &val)
Convert a type into a string.
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.

References phoenix_check(), and valueToString().

+ Here is the call graph for this function:

◆ phoenix_check() [2/2]

bool phoenix_check ( const std::string &  testName,
const std::string &  val,
const std::string &  reference 
)

Check two string.

Parameters
testName: name of the current test
val: std::string to be checked
reference: reference std::string
Returns
true if val == reference, false otherwise

Definition at line 15 of file phoenix_check.cpp.

15  {
16  bool b(val == reference);
17  if(!b){
18  std::cout << "phoenix_check : " << testName << " => " << phoenix_isOk(b) << std::endl;
19  std::cout << "\tval = '"<<val<<"'" << std::endl;
20  std::cout << "\treference = '"<<reference<<"'" << std::endl;
21  }
22  return b;
23 }
std::string phoenix_isOk(bool b)
Print OK or FAIL depending on the given boolean.

References phoenix_isOk().

Referenced by checkEraseFirstChars(), checkEraseFirstLastChars(), checkEraseLastChars(), checkFindPatternIndex(), checkGetBetweenDelimiter(), checkLoadFromConfig(), checkOpenVecFileStream(), checkOptionCompletion(), checkParser(), checkParseXmlFile(), checkPhoenixCheck(), checkResultConvertToString(), checkString(), checkVarReplaceStr(), checkXmlString(), main(), phoenix_check(), printValueOfOpt(), printValueOfOptConst(), testCheck(), testCheckList(), testCheckVector(), testDicoValueKey(), testEscapeString(), testFromJSonToJSon(), testIsOk(), testPFileParserGetUntilKey(), testPFileParserPartern(), testPFileParserParternExclude(), testPFileParserParternRecurse(), testPFileParserParternRecurse2(), testPFileParserParternRecurseAllowChar(), testPFileParserParternRecurseExcludeEnd(), testPFileParserParternRecurseExcludeEnd2(), testPFileParserSeq(), testPFileParserSeqOneStep(), testPPathGetExtention(), testPPathGetFileDirName(), testPPathGetUnderPath(), testPPathListAllFileInDir(), testPPathOperator(), testPPathRemoveDots(), and testRemaningArgument().

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