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

Side by Side Diff: base/threading/simple_thread_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 #include "base/atomic_sequence_num.h" 5 #include "base/atomic_sequence_num.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/threading/simple_thread.h" 8 #include "base/threading/simple_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/googletest/include/gtest/gtest.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 namespace { 13 namespace {
14 14
15 class SetIntRunner : public DelegateSimpleThread::Delegate { 15 class SetIntRunner : public DelegateSimpleThread::Delegate {
16 public: 16 public:
17 SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { } 17 SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { }
18 ~SetIntRunner() override {} 18 ~SetIntRunner() override {}
19 19
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 VerifyPoolRunner verifier(&seq2, 9, &event); 157 VerifyPoolRunner verifier(&seq2, 9, &event);
158 pool.Start(); 158 pool.Start();
159 159
160 pool.AddWork(&verifier, 10); 160 pool.AddWork(&verifier, 10);
161 161
162 pool.JoinAll(); 162 pool.JoinAll();
163 EXPECT_EQ(seq2.GetNext(), 10); 163 EXPECT_EQ(seq2.GetNext(), 10);
164 } 164 }
165 165
166 } // namespace base 166 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/sequenced_worker_pool_unittest.cc ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698