![]() |
PhoenixGenerator
2.0.0
Set of tools to generate code
|
Go to the source code of this file.
Functions | |
bool | project_wrapper_allClassTest (const PPath &testDirectory, const PString &moduleName, const std::vector< PClassConfig > &vecClassConfig) |
Generate the test for all class inside the module. More... | |
bool | project_wrapper_classTest (const PPath &testDirectory, const PString &moduleName, const PClassConfig &classConfig, const std::map< std::string, PClassConfig > &mapClass) |
Generate the test for all class inside the module. More... | |
bool | project_wrapper_moduleGeneratorTest (const PPath &projectPath, const ProjectConfig &projectConfig, const PString &moduleName, const std::vector< PClassConfig > &vecClassConfig, const PVecPath &vecInclude) |
Generate the unit tests of the project. More... | |
PString | pythonAssertTestValue (const PString &varName, const PClassAttribute &attr, const PString &moduleName, const PString &indentation, const std::map< std::string, PClassConfig > &mapClass) |
Get the default set of given attribute for a test. More... | |
PString | pythonDefaultTestValue (const PString &varName, const PClassAttribute &attr, const PString &moduleName, const PString &indentation, const std::map< std::string, PClassConfig > &mapClass) |
Get the default set of given attribute for a test. More... | |
PString | pythonGetDefaultTestValue (PString &type) |
Get the default of a given type for a test. More... | |
bool project_wrapper_allClassTest | ( | const PPath & | testDirectory, |
const PString & | moduleName, | ||
const std::vector< PClassConfig > & | vecClassConfig | ||
) |
Generate the test for all class inside the module.
testDirectory | : directory whre to write tests |
moduleName | : name of the python module |
vecClassConfig | : vector of class confoguration |
Definition at line 149 of file wrapper_test.cpp.
References project_wrapper_classTest().
Referenced by project_wrapper_moduleGeneratorTest().
bool project_wrapper_classTest | ( | const PPath & | testDirectory, |
const PString & | moduleName, | ||
const PClassConfig & | classConfig, | ||
const std::map< std::string, PClassConfig > & | mapClass | ||
) |
Generate the test for all class inside the module.
testDirectory | : directory whre to write tests |
moduleName | : name of the python module |
classConfig | : class confoguration |
mapClass | : map of all classes/types defined for this configuration |
Definition at line 101 of file wrapper_test.cpp.
References getCMakeListsHeader(), PClassConfig::getIsEnum(), PClassConfig::getListAttribute(), PClassConfig::getName(), pythonAssertTestValue(), pythonDefaultTestValue(), and PPath::saveFileContent().
Referenced by project_wrapper_allClassTest().
bool project_wrapper_moduleGeneratorTest | ( | const PPath & | projectPath, |
const ProjectConfig & | projectConfig, | ||
const PString & | moduleName, | ||
const std::vector< PClassConfig > & | vecClassConfig, | ||
const PVecPath & | vecInclude | ||
) |
Generate the unit tests of the project.
projectPath | : path of the module |
projectConfig | : config of the project |
moduleName | : name of the module |
vecClassConfig | : vector of class confoguration |
vecInclude | : vector of includes |
Definition at line 169 of file wrapper_test.cpp.
References PPath::createDirectory(), and project_wrapper_allClassTest().
Referenced by project_wrapper_generator().
PString pythonAssertTestValue | ( | const PString & | varName, |
const PClassAttribute & | attr, | ||
const PString & | moduleName, | ||
const PString & | indentation, | ||
const std::map< std::string, PClassConfig > & | mapClass | ||
) |
Get the default set of given attribute for a test.
varName | : name of the variable of the class to be used |
attr | : attribute to be set |
moduleName | : name of the module to be used |
indentation | : indentation of the set |
mapClass | : map of all classes/types defined for this configuration |
Definition at line 74 of file wrapper_test.cpp.
References PClassAttribute::getIsEnum(), PClassAttribute::getName(), PClassAttribute::getType(), and pythonGetDefaultTestValue().
Referenced by project_wrapper_classTest().
PString pythonDefaultTestValue | ( | const PString & | varName, |
const PClassAttribute & | attr, | ||
const PString & | moduleName, | ||
const PString & | indentation, | ||
const std::map< std::string, PClassConfig > & | mapClass | ||
) |
Get the default set of given attribute for a test.
varName | : name of the variable of the class to be used |
attr | : attribute to be set |
moduleName | : name of the module to be used |
indentation | : indentation of the set |
mapClass | : map of all classes/types defined for this configuration |
Definition at line 45 of file wrapper_test.cpp.
References PClassAttribute::getIsEnum(), PClassAttribute::getName(), PClassAttribute::getType(), and pythonGetDefaultTestValue().
Referenced by project_wrapper_classTest().
Get the default of a given type for a test.
type | : type of the attribute to be set |
Definition at line 15 of file wrapper_test.cpp.
References generator_getListNestedType(), and generator_typeIsList().
Referenced by pythonAssertTestValue(), and pythonDefaultTestValue().