refactor(tests): organize test namespaces
This commit is contained in:
@@ -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,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user