コード例 #1
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 private static VcClock Join(VcClock aLeft, VcClock aRight)
 {
     return new VcClock(aLeft.Id, aLeft.CurrentTime.Update(aRight.CurrentTime));
 }
コード例 #2
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 private static VcClock ForkRight(VcClock aStamp)
 {
     return new VcClock(aStamp.Id + "R", aStamp.CurrentTime);
 }
コード例 #3
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 private static VcClock ForkLeft(VcClock aStamp)
 {
     return new VcClock(aStamp.Id + "L", aStamp.CurrentTime);
 }
コード例 #4
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 private static VcClock Event(VcClock aClock)
 {
     return new VcClock(aClock.Id, aClock.CurrentTime.Advance(aClock.Id));
 }
コード例 #5
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 private static void Check(VcClock aStamp, string aToString)
 {
     Assert.That(
         aStamp.ToString(),
         Is.EqualTo(aToString));
 }
コード例 #6
0
ファイル: VectorClocksTests.cs プロジェクト: weeble/ohos
 public void FromStringTests(Func<VcClock> aFunc, string aString)
 {
     VcClock expectedStamp = aFunc();
     VcClock fromStringStamp = new VcClock();
     fromStringStamp.LoadState(aString);
     Assert.That(
         fromStringStamp.ToString(),
         Is.EqualTo(expectedStamp.ToString()));
 }