mirror of
https://github.com/lucaspalomodevelop/lpstd.git
synced 2026-03-12 23:27:22 +00:00
add getCommands() | add drawResults in describe function
This commit is contained in:
parent
2f3fc70cd8
commit
3847522e8f
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user