refactor(tests): organize test namespaces
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "result.hpp"
|
#include "result.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace core::tests {
|
||||||
|
|
||||||
using namespace core;
|
using namespace core;
|
||||||
|
|
||||||
@@ -108,9 +108,9 @@ void runAllTests() {
|
|||||||
testBasicResultWithCustomError();
|
testBasicResultWithCustomError();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace core::tests
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
runAllTests();
|
core::tests::runAllTests();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "logger.hpp"
|
#include "logger.hpp"
|
||||||
#include "scoped_file.hpp"
|
#include "scoped_file.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace logger::tests {
|
||||||
|
|
||||||
using namespace logger;
|
using namespace logger;
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ void testWithFileName() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void testWriteLogSuccess() {
|
void testWriteLogSuccess() {
|
||||||
ScopedFile file("logger_test.log");
|
helpers::ScopedFile file("logger_test.log");
|
||||||
|
|
||||||
file.throwIfExists();
|
file.throwIfExists();
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ void testWriteLogSuccess() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void testWriteLogFailure() {
|
void testWriteLogFailure() {
|
||||||
ScopedFile file("logger_test_directory");
|
helpers::ScopedFile file("logger_test_directory");
|
||||||
|
|
||||||
file.throwIfExists();
|
file.throwIfExists();
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ void testWriteLogFailure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void testMultipleWrites() {
|
void testMultipleWrites() {
|
||||||
ScopedFile file("multiple.log");
|
helpers::ScopedFile file("multiple.log");
|
||||||
|
|
||||||
file.throwIfExists();
|
file.throwIfExists();
|
||||||
|
|
||||||
@@ -118,10 +118,10 @@ void runTests() {
|
|||||||
testMultipleWrites();
|
testMultipleWrites();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace logger::tests
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
runTests();
|
logger::tests::runTests();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user