From 73fe580f9fda0ba417cf4004fdf618fe1635eba1 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Thu, 11 Jul 2024 12:59:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(tests):=20Functional=20-?= =?UTF-8?q?=20move=20utils=20namespace=20to=20leka::?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/functional/include/tests/config.h | 1 + tests/functional/include/tests/utils.h | 4 ++-- tests/functional/include/tests/utils_sleep.h | 4 ++-- .../suite_core_buffered_serial.cpp | 2 +- tests/functional/tests/deep_sleep_core_lcd/suite_core_lcd.cpp | 2 +- .../tests/deep_sleep_core_motor/suite_core_motor.cpp | 2 +- tests/functional/tests/deep_sleep_core_pwm/suite_core_pwm.cpp | 2 +- tests/functional/tests/deep_sleep_log_kit/suite_log_kit.cpp | 3 ++- tests/functional/tests/deep_sleep_mbed_hal/suite_mbed_hal.cpp | 3 ++- 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/functional/include/tests/config.h b/tests/functional/include/tests/config.h index 1416b136af..5c9360d2ea 100644 --- a/tests/functional/include/tests/config.h +++ b/tests/functional/include/tests/config.h @@ -15,6 +15,7 @@ namespace ut = boost::ut; namespace cfg { using namespace std::literals; +using namespace leka; namespace output { diff --git a/tests/functional/include/tests/utils.h b/tests/functional/include/tests/utils.h index f6f4078ac7..c1115d6645 100644 --- a/tests/functional/include/tests/utils.h +++ b/tests/functional/include/tests/utils.h @@ -11,7 +11,7 @@ #include "LogKit.h" -namespace utils { +namespace leka::utils { namespace time { @@ -56,4 +56,4 @@ namespace sd { } // namespace sd -} // namespace utils +} // namespace leka::utils diff --git a/tests/functional/include/tests/utils_sleep.h b/tests/functional/include/tests/utils_sleep.h index e177d8264e..32adb8a6d7 100644 --- a/tests/functional/include/tests/utils_sleep.h +++ b/tests/functional/include/tests/utils_sleep.h @@ -20,7 +20,7 @@ using namespace std::chrono; -namespace utils::sleep { +namespace leka::utils::sleep { constexpr inline auto SERIAL_FLUSH_TIME_MS = 150ms; constexpr inline auto US_PER_S = 1'000'000; @@ -142,4 +142,4 @@ inline auto get_deep_sleep_over_idle_time_ratio_for_duration(std::chrono::millis return deep_sleep_ratio; } -} // namespace utils::sleep +} // namespace leka::utils::sleep diff --git a/tests/functional/tests/deep_sleep_core_buffered_serial/suite_core_buffered_serial.cpp b/tests/functional/tests/deep_sleep_core_buffered_serial/suite_core_buffered_serial.cpp index 09bff5c23a..d532f9ca3f 100644 --- a/tests/functional/tests/deep_sleep_core_buffered_serial/suite_core_buffered_serial.cpp +++ b/tests/functional/tests/deep_sleep_core_buffered_serial/suite_core_buffered_serial.cpp @@ -9,9 +9,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" +using namespace std::chrono; using namespace leka; using namespace boost::ut; -using namespace std::chrono; using namespace boost::ut::bdd; suite suite_core_buffered_serial = [] { diff --git a/tests/functional/tests/deep_sleep_core_lcd/suite_core_lcd.cpp b/tests/functional/tests/deep_sleep_core_lcd/suite_core_lcd.cpp index 27541f16d2..59ebfbed66 100644 --- a/tests/functional/tests/deep_sleep_core_lcd/suite_core_lcd.cpp +++ b/tests/functional/tests/deep_sleep_core_lcd/suite_core_lcd.cpp @@ -21,9 +21,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" +using namespace std::chrono; using namespace leka; using namespace boost::ut; -using namespace std::chrono; using namespace boost::ut::bdd; auto backlight = CorePwm {SCREEN_BACKLIGHT_PWM}; diff --git a/tests/functional/tests/deep_sleep_core_motor/suite_core_motor.cpp b/tests/functional/tests/deep_sleep_core_motor/suite_core_motor.cpp index 07417bead0..df146ae491 100644 --- a/tests/functional/tests/deep_sleep_core_motor/suite_core_motor.cpp +++ b/tests/functional/tests/deep_sleep_core_motor/suite_core_motor.cpp @@ -8,9 +8,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" +using namespace std::chrono; using namespace leka; using namespace boost::ut; -using namespace std::chrono; using namespace boost::ut::bdd; suite suite_core_motor = [] { diff --git a/tests/functional/tests/deep_sleep_core_pwm/suite_core_pwm.cpp b/tests/functional/tests/deep_sleep_core_pwm/suite_core_pwm.cpp index eb0eacc9f3..7f23a637ee 100644 --- a/tests/functional/tests/deep_sleep_core_pwm/suite_core_pwm.cpp +++ b/tests/functional/tests/deep_sleep_core_pwm/suite_core_pwm.cpp @@ -9,9 +9,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" +using namespace std::chrono; using namespace leka; using namespace boost::ut; -using namespace std::chrono; using namespace boost::ut::bdd; suite suite_core_pwm = [] { diff --git a/tests/functional/tests/deep_sleep_log_kit/suite_log_kit.cpp b/tests/functional/tests/deep_sleep_log_kit/suite_log_kit.cpp index 9e615a26ed..3246716563 100644 --- a/tests/functional/tests/deep_sleep_log_kit/suite_log_kit.cpp +++ b/tests/functional/tests/deep_sleep_log_kit/suite_log_kit.cpp @@ -8,8 +8,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" -using namespace boost::ut; using namespace std::chrono; +using namespace leka; +using namespace boost::ut; using namespace boost::ut::bdd; suite suite_log_kit = [] { diff --git a/tests/functional/tests/deep_sleep_mbed_hal/suite_mbed_hal.cpp b/tests/functional/tests/deep_sleep_mbed_hal/suite_mbed_hal.cpp index 442cb67280..e620b825ea 100644 --- a/tests/functional/tests/deep_sleep_mbed_hal/suite_mbed_hal.cpp +++ b/tests/functional/tests/deep_sleep_mbed_hal/suite_mbed_hal.cpp @@ -8,8 +8,9 @@ #include "tests/utils.h" #include "tests/utils_sleep.h" -using namespace boost::ut; using namespace std::chrono; +using namespace leka; +using namespace boost::ut; using namespace boost::ut::bdd; // ? tests inspired from https://github.com/ARMmbed/mbed-os