diff --git a/include/BNO08xTestHelper.hpp b/include/BNO08xTestHelper.hpp index f3b90a4..9ceece3 100644 --- a/include/BNO08xTestHelper.hpp +++ b/include/BNO08xTestHelper.hpp @@ -14,12 +14,12 @@ class BNO08xTestHelper public: static void print_test_start_banner(const char* TEST_TAG) { - printf("------------------------BEGIN TEST: %s------------------------\n\r", TEST_TAG); + printf("------------------------ BEGIN TEST: %s ------------------------\n\r", TEST_TAG); } static void print_test_end_banner(const char* TEST_TAG) { - printf("------------------------END TEST: %s------------------------\n\r", TEST_TAG); + printf("------------------------ END TEST: %s ------------------------\n\r", TEST_TAG); } static void print_test_msg(const char* TEST_TAG, const char* msg) diff --git a/include/BNO08xTestSuite.hpp b/include/BNO08xTestSuite.hpp index 7053dc5..f95c083 100644 --- a/include/BNO08xTestSuite.hpp +++ b/include/BNO08xTestSuite.hpp @@ -12,8 +12,32 @@ set(TEST_COMPONENTS "esp32_BNO08x" CACHE STRING "Components to test.") class BNO08xTestSuite { - public: - static void run_all_tests(); - static void run_init_deinit_tests(); + private: + static void print_begin_tests_banner(const char* test_set_name) + { + printf("####################### BEGIN TESTS: %s #######################\n\r", test_set_name); + } + static void print_end_tests_banner(const char *test_set_name) + { + printf("####################### END TESTS: %s #######################\n\r", test_set_name); + } + + public: + static void run_all_tests() + { + run_init_deinit_tests(); + } + + static void run_init_deinit_tests() + { + print_begin_tests_banner("init_denit_tests"); + + UNITY_BEGIN(); + unity_run_tests_by_tag("[Init]", false); + unity_run_tests_by_tag("[FullInitDenit]", false); + UNITY_END(); + + print_end_tests_banner("init_denit_tests"); + } }; \ No newline at end of file diff --git a/source/BNO08xTestSuite.cpp b/source/BNO08xTestSuite.cpp deleted file mode 100644 index 56ad28a..0000000 --- a/source/BNO08xTestSuite.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "BNO08xTestSuite.hpp" - -void BNO08xTestSuite::run_all_tests() -{ - run_init_deinit_tests(); -} - -void BNO08xTestSuite::run_init_deinit_tests() -{ - UNITY_BEGIN(); - unity_run_tests_by_tag("[Init]", false); - UNITY_END(); - - UNITY_BEGIN(); - unity_run_test_by_name("Full Init & Deinit"); - UNITY_END(); -} \ No newline at end of file diff --git a/test/ReportTests.cpp b/test/ReportTests.cpp new file mode 100644 index 0000000..7f9578b --- /dev/null +++ b/test/ReportTests.cpp @@ -0,0 +1,2 @@ +#include "unity.h" +#include "../include/BNO08xTestHelper.hpp"