From db1d32ddc2182a8ced3a2f78c3def479df98432e Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 8 Nov 2020 20:36:48 +0100 Subject: [PATCH] test function changes --- src/console.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 95e03ce72..ac96c2cbd 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -20,9 +20,7 @@ #include "emsesp.h" #include "version.h" -#if defined(EMSESP_DEBUG) #include "test/test.h" -#endif namespace emsesp { @@ -494,28 +492,20 @@ void Console::load_standard_commands(unsigned int context) { #if defined(EMSESP_DEBUG) EMSESPShell::commands->add_command(context, CommandFlags::USER, - flash_string_vector{F_(test)}, + flash_string_vector{F("test")}, flash_string_vector{F_(name_optional)}, - [](Shell & shell, const std::vector & arguments __attribute__((unused))) { + [](Shell & shell, const std::vector & arguments) { if (arguments.size() == 0) { Test::run_test(shell, "default"); } else { Test::run_test(shell, arguments.front()); } }); -#endif - -#if defined(EMSESP_STANDALONE) EMSESPShell::commands->add_command(context, CommandFlags::USER, flash_string_vector{F("t")}, - flash_string_vector{F_(name_optional)}, [](Shell & shell, const std::vector & arguments __attribute__((unused))) { - if (arguments.size() == 0) { - Test::run_test(shell, "default"); - } else { - Test::run_test(shell, arguments.front()); - } + Test::run_test(shell, "default"); }); #endif