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

Side by Side Diff: test/unittests/base/atomic-utils-unittest.cc

Issue 1954603002: Move atomic-utils.h into base/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/unittests/atomic-utils-unittest.cc ('k') | test/unittests/unittests.gyp » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 <limits.h> 5 #include <limits.h>
6 6
7 #include "src/atomic-utils.h" 7 #include "src/base/atomic-utils.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace base {
12 12
13 TEST(AtomicNumber, Constructor) { 13 TEST(AtomicNumber, Constructor) {
14 // Test some common types. 14 // Test some common types.
15 AtomicNumber<int> zero_int; 15 AtomicNumber<int> zero_int;
16 AtomicNumber<size_t> zero_size_t; 16 AtomicNumber<size_t> zero_size_t;
17 AtomicNumber<intptr_t> zero_intptr_t; 17 AtomicNumber<intptr_t> zero_intptr_t;
18 EXPECT_EQ(0, zero_int.Value()); 18 EXPECT_EQ(0, zero_int.Value());
19 EXPECT_EQ(0U, zero_size_t.Value()); 19 EXPECT_EQ(0U, zero_size_t.Value());
20 EXPECT_EQ(0, zero_intptr_t.Value()); 20 EXPECT_EQ(0, zero_intptr_t.Value());
21 } 21 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 AtomicEnumSet<TestSetValue> a; 206 AtomicEnumSet<TestSetValue> a;
207 AtomicEnumSet<TestSetValue> b; 207 AtomicEnumSet<TestSetValue> b;
208 a.Add(kAA); 208 a.Add(kAA);
209 EXPECT_FALSE(a == b); 209 EXPECT_FALSE(a == b);
210 EXPECT_TRUE(a != b); 210 EXPECT_TRUE(a != b);
211 b.Add(kAA); 211 b.Add(kAA);
212 EXPECT_TRUE(a == b); 212 EXPECT_TRUE(a == b);
213 EXPECT_FALSE(a != b); 213 EXPECT_FALSE(a != b);
214 } 214 }
215 215
216 } // namespace internal 216 } // namespace base
217 } // namespace v8 217 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/atomic-utils-unittest.cc ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698