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

Side by Side Diff: blimp/helium/lww_register_unittest.cc

Issue 2402153002: Add CompoundSyncable class for synchronizing containers of Syncables. (Closed)
Patch Set: make literal unsigned Created 4 years, 2 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 | « blimp/helium/lww_register.h ('k') | blimp/helium/result_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/helium/lww_register.h" 5 #include "blimp/helium/lww_register.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "blimp/helium/helium_test.h"
10 #include "blimp/helium/revision_generator.h" 11 #include "blimp/helium/revision_generator.h"
11 #include "blimp/helium/version_vector.h" 12 #include "blimp/helium/version_vector.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite .h" 14 #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite .h"
14 15
15 namespace blimp { 16 namespace blimp {
16 namespace helium { 17 namespace helium {
17 namespace { 18 namespace {
18 19
19 class LwwRegisterTest : public testing::Test { 20 class LwwRegisterTest : public HeliumTest {
20 public: 21 public:
21 LwwRegisterTest() {} 22 LwwRegisterTest() {}
22 ~LwwRegisterTest() override = default; 23 ~LwwRegisterTest() override = default;
23 24
24 protected: 25 protected:
25 void Initialize(Peer bias) { 26 void Initialize(Peer bias) {
26 client_ = base::MakeUnique<LwwRegister<int>>(bias, Peer::CLIENT); 27 client_ = base::MakeUnique<LwwRegister<int>>(bias, Peer::CLIENT);
27 engine_ = base::MakeUnique<LwwRegister<int>>(bias, Peer::ENGINE); 28 engine_ = base::MakeUnique<LwwRegister<int>>(bias, Peer::ENGINE);
28 } 29 }
29 30
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 client_->Set(123); 138 client_->Set(123);
138 engine_->Set(456); 139 engine_->Set(456);
139 SyncFromClient(); 140 SyncFromClient();
140 141
141 EXPECT_EQ(456, engine_->Get()); 142 EXPECT_EQ(456, engine_->Get());
142 } 143 }
143 144
144 } // namespace 145 } // namespace
145 } // namespace helium 146 } // namespace helium
146 } // namespace blimp 147 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/helium/lww_register.h ('k') | blimp/helium/result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698