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

Unified Diff: base/tools_sanity_unittest.cc

Issue 3765002: Copied Evan's http://codereview.chromium.org/3691007 (base_unittests: move... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698