diff --git a/unittests/Basic/URI.cpp b/unittests/Basic/URI.cpp index 4a1fc148..344889fa 100644 --- a/unittests/Basic/URI.cpp +++ b/unittests/Basic/URI.cpp @@ -1,9 +1,9 @@ #include #include -namespace { +namespace clice { -using namespace clice; +namespace { TEST(URITest, ConstructorAndAccessors) { URI uri("https", "reviews.llvm.org", "/D41946"); @@ -43,3 +43,5 @@ TEST(URITest, ParseFunction) { } // namespace +} // namespace clice + diff --git a/unittests/Compiler/Compiler.cpp b/unittests/Compiler/Compiler.cpp index 7d9cbfd0..0a8a198b 100644 --- a/unittests/Compiler/Compiler.cpp +++ b/unittests/Compiler/Compiler.cpp @@ -2,9 +2,9 @@ #include "Compiler/Compiler.h" #include -namespace { +namespace clice { -using namespace clice; +namespace { TEST(Compiler, buildAST) { const char* code = R"cpp( @@ -223,3 +223,6 @@ export int foo = 1; } } // namespace + +} // namespace clice + diff --git a/unittests/Compiler/Resolver.cpp b/unittests/Compiler/Resolver.cpp index cee95c1f..0e9d95f3 100644 --- a/unittests/Compiler/Resolver.cpp +++ b/unittests/Compiler/Resolver.cpp @@ -2,12 +2,10 @@ #include #include +namespace clice { + namespace { -using namespace clice; - -namespace testing {} // namespace testing - struct TemplateResolverTester : public clang::RecursiveASTVisitor { TemplateResolverTester(llvm::StringRef code) { compileArgs = { @@ -485,3 +483,5 @@ struct test { } // namespace +} // namespace clice + diff --git a/unittests/Feature/CodeCompletion.cpp b/unittests/Feature/CodeCompletion.cpp index 2ca48f82..ef4150c1 100644 --- a/unittests/Feature/CodeCompletion.cpp +++ b/unittests/Feature/CodeCompletion.cpp @@ -1,12 +1,9 @@ #include "../Test.h" -#include "Compiler/Compiler.h" -#include "Support/Support.h" - #include "Feature/CodeCompletion.h" -namespace { +namespace clice { -using namespace clice; +namespace { TEST(Feature, CodeCompletion) { const char* code = R"cpp( @@ -41,3 +38,6 @@ int main() { } } // namespace + +} // namespace clice + diff --git a/unittests/Server/Async.cpp b/unittests/Server/Async.cpp index 12aa8dad..aa94e130 100644 --- a/unittests/Server/Async.cpp +++ b/unittests/Server/Async.cpp @@ -1,9 +1,9 @@ #include "../Test.h" #include "Server/Async.h" -namespace { +namespace clice { -using namespace clice; +namespace { async::promise add(int a, int b) { co_return a + b; @@ -23,3 +23,6 @@ TEST(clice, coroutine) { } } // namespace + +} // namespace clice + diff --git a/unittests/Support/JSON.cpp b/unittests/Support/JSON.cpp index a3ffe883..b020aac9 100644 --- a/unittests/Support/JSON.cpp +++ b/unittests/Support/JSON.cpp @@ -38,11 +38,11 @@ TEST(Support, JSON) { {"y", 2}, }; - auto point = clice::json::deserialize(std::move(object)); + auto point = json::deserialize(std::move(object)); ASSERT_EQ(point.x, 1); ASSERT_EQ(point.y, 2); - auto result = clice::json::serialize(point); + auto result = json::serialize(point); ASSERT_EQ(result, object); }