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

Side by Side Diff: base/atomicops_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, 1 month 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
« no previous file with comments | « base/at_exit_unittest.cc ('k') | base/barrier_closure_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/atomicops.h" 5 #include "base/atomicops.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/googletest/include/gtest/gtest.h"
11 11
12 template <class AtomicType> 12 template <class AtomicType>
13 static void TestAtomicIncrement() { 13 static void TestAtomicIncrement() {
14 // For now, we just test single threaded execution 14 // For now, we just test single threaded execution
15 15
16 // use a guard value to make sure the NoBarrier_AtomicIncrement doesn't go 16 // use a guard value to make sure the NoBarrier_AtomicIncrement doesn't go
17 // outside the expected address bounds. This is in particular to 17 // outside the expected address bounds. This is in particular to
18 // test that some future change to the asm code doesn't cause the 18 // test that some future change to the asm code doesn't cause the
19 // 32-bit NoBarrier_AtomicIncrement doesn't do the wrong thing on 64-bit 19 // 32-bit NoBarrier_AtomicIncrement doesn't do the wrong thing on 64-bit
20 // machines. 20 // machines.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 TEST(AtomicOpsTest, Store) { 240 TEST(AtomicOpsTest, Store) {
241 TestStore<base::subtle::Atomic32>(); 241 TestStore<base::subtle::Atomic32>();
242 TestStore<base::subtle::AtomicWord>(); 242 TestStore<base::subtle::AtomicWord>();
243 } 243 }
244 244
245 TEST(AtomicOpsTest, Load) { 245 TEST(AtomicOpsTest, Load) {
246 TestLoad<base::subtle::Atomic32>(); 246 TestLoad<base::subtle::Atomic32>();
247 TestLoad<base::subtle::AtomicWord>(); 247 TestLoad<base::subtle::AtomicWord>();
248 } 248 }
OLDNEW
« no previous file with comments | « base/at_exit_unittest.cc ('k') | base/barrier_closure_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698