From 3847522e8fddcd83962b35b90d383110ba7ead5c Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Sun, 29 Oct 2023 23:00:52 +0100 Subject: [PATCH] add getCommands() | add drawResults in describe function --- src/classes/command.hpp | 5 +++++ src/testing/testing.hpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/classes/command.hpp b/src/classes/command.hpp index 2b50cdb..9f472bc 100644 --- a/src/classes/command.hpp +++ b/src/classes/command.hpp @@ -88,6 +88,11 @@ namespace lpstd return values.size() > 0 ? values[0] : ""; } + std::list getCommands() + { + return this->commands; + } + void addCommand(std::string name, std::string description, void (*func)(void)) { commandInfo command; diff --git a/src/testing/testing.hpp b/src/testing/testing.hpp index 382a4ea..eba7207 100644 --- a/src/testing/testing.hpp +++ b/src/testing/testing.hpp @@ -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 testCase)