From b1a155a46985ef366164dd82d17bdd457a310f1e Mon Sep 17 00:00:00 2001 From: user Date: Mon, 20 Jul 2026 23:01:50 +0400 Subject: [PATCH] refactor(tests): organize test namespaces --- tests/core/result_test.cpp | 6 +++--- tests/logger/logger_test.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/core/result_test.cpp b/tests/core/result_test.cpp index 4758879..6225e3c 100644 --- a/tests/core/result_test.cpp +++ b/tests/core/result_test.cpp @@ -4,7 +4,7 @@ #include "result.hpp" -namespace { +namespace core::tests { using namespace core; @@ -108,9 +108,9 @@ void runAllTests() { testBasicResultWithCustomError(); } -} // namespace +} // namespace core::tests int main() { - runAllTests(); + core::tests::runAllTests(); return 0; } diff --git a/tests/logger/logger_test.cpp b/tests/logger/logger_test.cpp index 3a0bc6d..4d9a087 100644 --- a/tests/logger/logger_test.cpp +++ b/tests/logger/logger_test.cpp @@ -6,7 +6,7 @@ #include "logger.hpp" #include "scoped_file.hpp" -namespace { +namespace logger::tests { using namespace logger; @@ -40,7 +40,7 @@ void testWithFileName() { } void testWriteLogSuccess() { - ScopedFile file("logger_test.log"); + helpers::ScopedFile file("logger_test.log"); file.throwIfExists(); @@ -62,7 +62,7 @@ void testWriteLogSuccess() { } void testWriteLogFailure() { - ScopedFile file("logger_test_directory"); + helpers::ScopedFile file("logger_test_directory"); file.throwIfExists(); @@ -79,7 +79,7 @@ void testWriteLogFailure() { } void testMultipleWrites() { - ScopedFile file("multiple.log"); + helpers::ScopedFile file("multiple.log"); file.throwIfExists(); @@ -118,10 +118,10 @@ void runTests() { testMultipleWrites(); } -} // namespace +} // namespace logger::tests int main() { - runTests(); + logger::tests::runTests(); return 0; }