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

Side by Side Diff: base/task_scheduler/scheduler_worker_stack_unittest.cc

Issue 2213933003: Change EXPECT/ASSERT_DCHECK_DEATH macro to not expose the |regex| parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b2b0_simplethreadJoinable
Patch Set: Disabling a death test which crashed instead of DCHECKing : http://crbug.com/634552 Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/task_scheduler/scheduler_worker_stack.h" 5 #include "base/task_scheduler/scheduler_worker_stack.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/task_scheduler/scheduler_worker.h" 10 #include "base/task_scheduler/scheduler_worker.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 stack.Push(worker_a_.get()); 242 stack.Push(worker_a_.get());
243 EXPECT_EQ(1U, stack.Size()); 243 EXPECT_EQ(1U, stack.Size());
244 EXPECT_FALSE(stack.IsEmpty()); 244 EXPECT_FALSE(stack.IsEmpty());
245 } 245 }
246 246
247 // Verify that Push() DCHECKs when a value is inserted twice. 247 // Verify that Push() DCHECKs when a value is inserted twice.
248 TEST_F(TaskSchedulerWorkerStackTest, PushTwice) { 248 TEST_F(TaskSchedulerWorkerStackTest, PushTwice) {
249 SchedulerWorkerStack stack; 249 SchedulerWorkerStack stack;
250 stack.Push(worker_a_.get()); 250 stack.Push(worker_a_.get());
251 EXPECT_DCHECK_DEATH({ stack.Push(worker_a_.get()); }, ""); 251 EXPECT_DCHECK_DEATH({ stack.Push(worker_a_.get()); });
252 } 252 }
253 253
254 } // namespace internal 254 } // namespace internal
255 } // namespace base 255 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/scheduler_worker_pool_impl_unittest.cc ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698