Exemple #1
0
 public void ShouldIntersectRangesWithOneCommonAddress()
 {
     var range1 = new Range(0x1000, 0x200);
     var range2 = new Range(0x11ff, 0x300);
     var expectedResult = new Range(0x11ff, 0x1);
     var intersection = range1.Intersect(range2);
     Assert.AreEqual(expectedResult, intersection);
 }
Exemple #2
0
 public void ShouldIntersectRange()
 {
     var range1 = new Range(0x1000, 0x200);
     var range2 = new Range(0x1100, 0x300);
     var expectedResult = new Range(0x1100, 0x100);
     var intersection1 = range1.Intersect(range2);
     var intersection2 = range2.Intersect(range1);
     Assert.AreEqual(expectedResult, intersection1);
     Assert.AreEqual(expectedResult, intersection2);
 }