Index: base/tools_sanity_unittest.cc |
=================================================================== |
--- base/tools_sanity_unittest.cc (revision 62399) |
+++ base/tools_sanity_unittest.cc (working copy) |
@@ -27,14 +27,6 @@ |
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 @@ |
#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()) |