Index: base/tools_sanity_unittest.cc |
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc |
index 47a19b3fd7cd33d7553fd6bb49b74708cf126501..0f213818fe598626e54c56898c51f0610462cc7a 100644 |
--- a/base/tools_sanity_unittest.cc |
+++ b/base/tools_sanity_unittest.cc |
@@ -27,14 +27,6 @@ class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate { |
bool *value_; |
}; |
-} |
- |
-// A memory leak detector should report an error in this test. |
-TEST(ToolsSanityTest, MemoryLeak) { |
- int *leak = new int[256]; // Leak some memory intentionally. |
- leak[4] = 1; // Make sure the allocated memory is used. |
-} |
- |
void ReadUninitializedValue(char *ptr) { |
if (*ptr == '\0') { |
(*ptr)++; |
@@ -77,6 +69,14 @@ void MakeSomeErrors(char *ptr, size_t size) { |
#endif |
} |
+} // namespace |
+ |
+// A memory leak detector should report an error in this test. |
+TEST(ToolsSanityTest, MemoryLeak) { |
+ int *leak = new int[256]; // Leak some memory intentionally. |
+ leak[4] = 1; // Make sure the allocated memory is used. |
+} |
+ |
TEST(ToolsSanityTest, AccessesToNewMemory) { |
// This test may corrupt memory if not run under Valgrind. |
if (!RunningOnValgrind()) |