Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1649)

Unified Diff: base/memory/singleton_unittest.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT ios Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/memory/singleton_unittest.cc
diff --git a/base/memory/singleton_unittest.cc b/base/memory/singleton_unittest.cc
index dbff007ada7ecc27045acdff7082fb448024dab1..e8788babdfda8bec033b758c242e94705cbfb0ed 100644
--- a/base/memory/singleton_unittest.cc
+++ b/base/memory/singleton_unittest.cc
@@ -6,6 +6,7 @@
#include "base/memory/singleton.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace base {
namespace {
COMPILE_ASSERT(DefaultSingletonTraits<int>::kRegisterAtExit == true, a);
@@ -115,7 +116,7 @@ class AlignedTestSingleton {
~AlignedTestSingleton() {}
static AlignedTestSingleton* GetInstance() {
return Singleton<AlignedTestSingleton,
- StaticMemorySingletonTraits<AlignedTestSingleton> >::get();
+ StaticMemorySingletonTraits<AlignedTestSingleton>>::get();
}
Type type_;
@@ -147,7 +148,6 @@ CallbackFunc* GetStaticSingleton() {
return &CallbackSingletonWithStaticTrait::GetInstance()->callback_;
}
-} // namespace
class SingletonTest : public testing::Test {
public:
@@ -207,7 +207,7 @@ TEST_F(SingletonTest, Basic) {
CallbackFunc* static_singleton;
{
- base::ShadowingAtExitManager sem;
+ ShadowingAtExitManager sem;
{
singleton_int = SingletonInt();
}
@@ -241,7 +241,7 @@ TEST_F(SingletonTest, Basic) {
EXPECT_EQ(NULL, GetStaticSingleton());
{
- base::ShadowingAtExitManager sem;
+ ShadowingAtExitManager sem;
// Verifiy that the variables were reset.
{
singleton_int = SingletonInt();
@@ -285,3 +285,6 @@ TEST_F(SingletonTest, Alignment) {
EXPECT_ALIGNED(align128, 128);
EXPECT_ALIGNED(align4096, 4096);
}
+
+} // namespace
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698