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

Side by Side Diff: base/threading/thread_checker_unittest.cc

Issue 2163023002: Unify usage of logging/assert macros in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 #include "base/threading/thread_checker.h" 5 #include "base/threading/thread_checker.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/threading/simple_thread.h" 11 #include "base/threading/simple_thread.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 // Duplicated from base/threading/thread_checker.h so that we can be 14 // Duplicated from base/threading/thread_checker.h so that we can be
15 // good citizens there and undef the macro. 15 // good citizens there and undef the macro.
16 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) 16 #if DCHECK_IS_ON()
17 #define ENABLE_THREAD_CHECKER 1 17 #define ENABLE_THREAD_CHECKER 1
danakj 2016/07/19 20:17:01 and here.. and in the thread_checker.h? https://cs
gab 2016/07/20 02:43:58 Done.
18 #else 18 #else
19 #define ENABLE_THREAD_CHECKER 0 19 #define ENABLE_THREAD_CHECKER 0
20 #endif 20 #endif
21 21
22 namespace base { 22 namespace base {
23 23
24 namespace { 24 namespace {
25 25
26 // Simple class to exercise the basics of ThreadChecker. 26 // Simple class to exercise the basics of ThreadChecker.
27 // Both the destructor and DoStuff should verify that they were 27 // Both the destructor and DoStuff should verify that they were
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 ThreadCheckerClass::DetachThenCallFromDifferentThreadImpl(); 172 ThreadCheckerClass::DetachThenCallFromDifferentThreadImpl();
173 } 173 }
174 #endif // ENABLE_THREAD_CHECKER 174 #endif // ENABLE_THREAD_CHECKER
175 175
176 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_THREAD_CHECKER 176 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_THREAD_CHECKER
177 177
178 // Just in case we ever get lumped together with other compilation units. 178 // Just in case we ever get lumped together with other compilation units.
179 #undef ENABLE_THREAD_CHECKER 179 #undef ENABLE_THREAD_CHECKER
180 180
181 } // namespace base 181 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698