refactor(tests): organize test namespaces

This commit is contained in:
user
2026-07-20 23:01:50 +04:00
parent a3cd178155
commit b1a155a469
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -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;
}
+6 -6
View File
@@ -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;
}