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

Side by Side Diff: blimp/net/helium/vector_clock_generator_unittest.cc

Issue 2382533002: Helium: Initial proto and Syncable interface definition (Closed)
Patch Set: remainder stufft 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "blimp/net/helium/vector_clock_generator.h"
6
7 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace blimp {
11 namespace {
12
13 class VectorClockGeneratorTest : public testing::Test {
14 public:
15 VectorClockGeneratorTest() {}
16 ~VectorClockGeneratorTest() override {}
17
18 protected:
19 VectorClockGenerator gen_;
20
21 private:
22 DISALLOW_COPY_AND_ASSIGN(VectorClockGeneratorTest);
23 };
24
25 TEST_F(VectorClockGeneratorTest, nextFollowedByLast) {
Kevin M 2016/10/05 23:41:30 Don't understand this test name
scf 2016/10/06 19:47:17 Done.
26 VectorClock c1 = gen_.current();
27 EXPECT_EQ(VectorClock::Comparison::EqualTo, c1.CompareTo(gen_.current()));
28 }
29
30 TEST_F(VectorClockGeneratorTest, monotonicallyIncreasing) {
Kevin M 2016/10/05 23:41:30 MonotonicallyIncreasing
31 VectorClock c1 = gen_.current();
32 gen_.increment();
33 VectorClock c2 = gen_.current();
34 EXPECT_EQ(VectorClock::Comparison::GreaterThan, c2.CompareTo(c1));
35 EXPECT_EQ(VectorClock::Comparison::EqualTo, c2.CompareTo(gen_.current()));
36 }
37
38 } // namespace
39 } // namespace blimp
OLDNEW
« blimp/net/helium/vector_clock_generator.h ('K') | « blimp/net/helium/vector_clock_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698