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

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

Issue 2464703003: MIPS64: Fix NoBarrierAtomicValue.Construction test failure on big-endian (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | 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/base/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 {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 TEST(AtomicNumber, OperatorSubtractionAssignment) { 77 TEST(AtomicNumber, OperatorSubtractionAssignment) {
78 AtomicNumber<size_t> a(std::numeric_limits<size_t>::max()); 78 AtomicNumber<size_t> a(std::numeric_limits<size_t>::max());
79 AtomicNumber<size_t> b(std::numeric_limits<size_t>::max()); 79 AtomicNumber<size_t> b(std::numeric_limits<size_t>::max());
80 a -= b.Value(); 80 a -= b.Value();
81 EXPECT_EQ(a.Value(), 0u); 81 EXPECT_EQ(a.Value(), 0u);
82 EXPECT_EQ(b.Value(), std::numeric_limits<size_t>::max()); 82 EXPECT_EQ(b.Value(), std::numeric_limits<size_t>::max());
83 } 83 }
84 84
85 namespace { 85 namespace {
86 86
87 enum TestFlag { 87 enum TestFlag : base::AtomicWord {
88 kA, 88 kA,
89 kB, 89 kB,
90 kC, 90 kC,
91 }; 91 };
92 92
93 } // namespace 93 } // namespace
94 94
95 95
96 TEST(AtomicValue, Initial) { 96 TEST(AtomicValue, Initial) {
97 AtomicValue<TestFlag> a(kA); 97 AtomicValue<TestFlag> a(kA);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 a.Add(kAA); 265 a.Add(kAA);
266 EXPECT_FALSE(a == b); 266 EXPECT_FALSE(a == b);
267 EXPECT_TRUE(a != b); 267 EXPECT_TRUE(a != b);
268 b.Add(kAA); 268 b.Add(kAA);
269 EXPECT_TRUE(a == b); 269 EXPECT_TRUE(a == b);
270 EXPECT_FALSE(a != b); 270 EXPECT_FALSE(a != b);
271 } 271 }
272 272
273 } // namespace base 273 } // namespace base
274 } // namespace v8 274 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698