 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
20 bool checkResultLower(
const std::string & testName,
const std::string & strValue,
const std::string & strReference){
21 std::string convertedValue(
strToLower(strValue));
22 return phoenix_check(testName +
" Lower (" + strValue +
")", convertedValue, strReference);
31 bool checkResultUpper(
const std::string & testName,
const std::string & strValue,
const std::string & strReference){
32 std::string convertedValue(
strToUpper(strValue));
33 return phoenix_check(testName +
" Upper (" + strValue +
")", convertedValue, strReference);
42 bool checkResultFirstLower(
const std::string & testName,
const std::string & strValue,
const std::string & strReference){
44 return phoenix_check(testName +
" firstToLower (" + strValue +
")", convertedValue, strReference);
53 bool checkResultFirstUpper(
const std::string & testName,
const std::string & strValue,
const std::string & strReference){
55 return phoenix_check(testName +
" firstToUpper (" + strValue +
")", convertedValue, strReference);
66 return phoenix_check(testName +
" strToLowerUnderscore (" + strValue +
")", convertedValue, strReference);
104 bool testCharsType(
const std::string & tabChar,
bool isNumber,
bool isLetter,
bool isLowerCase,
bool isUpperCase,
bool isDot,
bool isStar){
106 for(
size_t i(0lu); i < tabChar.size(); ++i){
120 std::cout <<
"testCharsType ("<<tabChar<<
", isNumber = "<<isNumber<<
", isLetter = "<<isLetter<<
", isLowerCase = "<<isLowerCase<<
", isUpperCase = "<<isUpperCase<<
", isDot = "<<isDot<<
", isStar = "<<isStar<<
": ";
152 std::list<std::string> listNb;
154 listNb.push_back(
"10");
156 listNb.push_back(
"1");
158 listNb.push_back(
"Not a number");
162 int main(
int argc,
char** argv){
bool isCharNumberOrLetterOrDot(char ch)
Tels if the character is a letter, number, '.' or '_'.
std::string firstToLower(const std::string &str)
Convert first letter of the std::string in lower case.
bool isStrUpperCase(const std::string &str)
Say if the given std::string is in uppercase.
std::string strToLower(const std::string &str)
Convert std::string in lower case.
bool isCharLetter(char ch)
Tels if the character is a letter or '_'.
void phoenix_functionOk(const std::string &functionName, bool b)
Print the check function return.
std::string firstToUpper(const std::string &str)
Convert first letter of the std::string in upper case.
bool testCharsType(const std::string &tabChar, bool isNumber, bool isLetter, bool isLowerCase, bool isUpperCase, bool isDot, bool isStar)
Check char type.
std::string strToLowerUnderscore(const std::string &str)
Convert std::string in lower case and space in '_'.
bool checkResultLowerUnderscore(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string lower expression.
bool checkResultLower(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string lower expression.
bool isStrLowerCase(const std::string &str)
Say if the given std::string is in lowercase.
void testIsListStrNumber()
Test the is lower/upper case.
void testIsLowerUpper()
Test the is lower/upper case.
bool checkResultUpper(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string upper expression.
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.
bool isCharNumberOrLetterOrStar(char ch)
Tels if the character is letter, number, star or '_'.
bool isCharUpperCase(char ch)
Tels if the character is upper case letter.
void testStringLowerUpper()
Test lower/upper to string.
bool isCharLowerCase(char ch)
Tels if the character is lower case letter.
bool isCharNumberOrStar(char ch)
Tels if the character is number or star.
bool isStrNumber(const std::string &str)
Tels if std::string contains figures.
bool isCharNumberOrDot(char ch)
Tels if the character is a number or a '.'.
bool isCharLetterOrStar(char ch)
Tels if the character is letter, star or '_'.
bool isListStrNumber(const std::list< std::string > &listStr)
Say if the list of std::string contains a number.
#define phoenix_assert(isOk)
bool checkResultFirstUpper(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string upper expression.
bool isCharNumberOrLetter(char ch)
Tels if the character is letter, figure or '_'.
void testIsType()
Test the is lower/upper case.
bool isCharNumber(char ch)
Tels if the character is a number or not.
std::string strToUpper(const std::string &str)
Convert std::string in upper case.
bool checkResultFirstLower(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string lower expression.
int main(int argc, char **argv)
bool isStrNumberOrDot(const std::string &str)
Tels if std::string contains figures or dots.
bool isStrNumberDotMinusPlusE(const std::string &str)
Tels if std::string std::string contains figures, '.', -, +, e or E.