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

Side by Side Diff: base/tools_sanity_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains intentional memory errors, some of which may lead to 5 // This file contains intentional memory errors, some of which may lead to
6 // crashes if the test is ran without special memory testing tools. We use these 6 // crashes if the test is ran without special memory testing tools. We use these
7 // errors to verify the sanity of the tools. 7 // errors to verify the sanity of the tools.
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/debug/asan_invalid_access.h" 10 #include "base/debug/asan_invalid_access.h"
11 #include "base/debug/profiler.h" 11 #include "base/debug/profiler.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 13 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/googletest/include/gtest/gtest.h"
16 16
17 namespace base { 17 namespace base {
18 18
19 namespace { 19 namespace {
20 20
21 const base::subtle::Atomic32 kMagicValue = 42; 21 const base::subtle::Atomic32 kMagicValue = 42;
22 22
23 // Helper for memory accesses that can potentially corrupt memory or cause a 23 // Helper for memory accesses that can potentially corrupt memory or cause a
24 // crash during a native run. 24 // crash during a native run.
25 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) 25 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 class B { 348 class B {
349 virtual void f() {} 349 virtual void f() {}
350 }; 350 };
351 351
352 A a; 352 A a;
353 EXPECT_DEATH((void)(B*)&a, "ILL_ILLOPN"); 353 EXPECT_DEATH((void)(B*)&a, "ILL_ILLOPN");
354 } 354 }
355 #endif 355 #endif
356 356
357 } // namespace base 357 } // namespace base
OLDNEW
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698