 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
21 bool checkString(
const std::string & testName,
const std::string & strValue,
const std::string & strReference){
27 std::string fileName(
"someDir/someOtherDir/fileName.extention");
64 std::vector<std::string> vecDir;
67 vecDir.push_back(
"SomeInexistingDir");
70 vecDir.push_back(
"./");
80 std::vector<std::string> vecPath;
81 vecPath.push_back(
"");
82 vecPath.push_back(
"./dir");
83 vecPath.push_back(
"/usr/lib");
95 std::vector<std::string> vecUnderPath;
96 vecUnderPath.push_back(
"/usr/lib/shadok.so");
97 vecUnderPath.push_back(
"/usr/bin/shadok");
98 std::vector<std::string> vecOutUnderPath =
getUnderPath(vecUnderPath,
"usr");
119 int main(
int argc,
char** argv){
std::string getExistingFileName(const std::string &fileName, const std::vector< std::string > &vecDirectory)
Get the fileName with the directory to get a readable file.
bool createDirectoriesIfNotExist(const std::string &dirName)
Create the directory if not exists.
bool saveFileContent(const std::string &filename, const std::string &content)
Save a string in a file.
bool isDirectoryExist(const std::string &dirName)
Says if the given direcotry exists.
std::string getFileContent(const std::string &filename)
Get the file content in a string.
std::string getLongestExtention(const std::string &fileName)
Get the longest file extention.
std::string makeAbsolutePath(const std::string &path)
Make an absolute path of the given path.
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.
std::string eraseLongestExtension(const std::string &fileName)
Erase longest extention of the given file.
std::string eraseExtension(const std::string &fileName)
Erase extention of the given file.
std::string removePathDots(const std::string path)
Remove dots from the path.
void testStringFilename()
Test the string filename function.
std::string getFileName(const std::string &fileName)
fonction qui renvoie le nom du fichier du nom complet de fichier passé en paramètre
#define phoenix_assert(isOk)
std::string getExtention(const std::string &fileName)
Get file extention.
bool isAbsolutePath(const std::string &path)
Tel if a path is absolute or not.
bool isFileExist(const std::string &fileName)
Say if a file exsits or not.
std::string getDirectory(const std::string &fileName)
fonction qui renvoie le dossier parent du fichier
std::string getCurrentDirectory()
Returns the current directory.
bool checkString(const std::string &testName, const std::string &strValue, const std::string &strReference)
Check string lower expression.
std::string getUnderPath(const std::string &fileName, const std::string &pathPart)
Get path which is under the given pathPart ('some/dir/path' with 'dir' will return 'path')
int main(int argc, char **argv)
std::string getDirName(const std::string &path)
Get the name of the deeper directory.
bool isFileOrDirExist(const std::string &fileName)
Say if the given path name exsits or not.