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

Unified Diff: base/atomicops_unittest.cc

Issue 1410213004: Create "persistent memory allocator" for persisting and sharing objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved flags to Atomic32 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/memory/shared_memory_allocator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/atomicops_unittest.cc
diff --git a/base/atomicops_unittest.cc b/base/atomicops_unittest.cc
index 3fd559747226dab196d7f0cd68fc26c4dd9b3e7d..0d133f1bbf9e1100ef050870eab452e57cbddf01 100644
--- a/base/atomicops_unittest.cc
+++ b/base/atomicops_unittest.cc
@@ -89,6 +89,10 @@ static void TestCompareAndSwap() {
EXPECT_EQ(1, value);
EXPECT_EQ(0, prev);
+ AtomicType fail = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 2);
Alexander Potapenko 2015/11/02 19:40:53 I suggest you commit this change separately, it re
+ EXPECT_EQ(1, value);
+ EXPECT_EQ(1, fail);
+
// Use test value that has non-zero bits in both halves, more for testing
// 64-bit implementation on 32-bit platforms.
const AtomicType k_test_val = (static_cast<uint64_t>(1) <<
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/memory/shared_memory_allocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698