add getCommands() | add drawResults in describe function

This commit is contained in:
lucaspalomodevelop 2023-10-29 23:00:52 +01:00
parent 2f3fc70cd8
commit 3847522e8f
2 changed files with 8 additions and 0 deletions

View File

@ -88,6 +88,11 @@ namespace lpstd
return values.size() > 0 ? values[0] : "";
}
std::list<commandInfo> getCommands()
{
return this->commands;
}
void addCommand(std::string name, std::string description, void (*func)(void))
{
commandInfo command;

View File

@ -167,6 +167,7 @@ namespace lpstd
{
std::cout << description << std::endl;
testCase();
std::cout << std::endl;
}
// Custom describe function to group related test cases
@ -174,6 +175,8 @@ namespace lpstd
{
std::cout << "Describing " << description << std::endl;
testSuite();
drawResults();
std::cout << std::endl;
}
void testThrow(std::function<void()> testCase)