Ejemplo n.º 1
0
 public static void AssertInvariants <TPriority, TValue>(this BinaryHeap <TPriority, TValue> target)
 {
     Assert.IsTrue(target.Capacity >= 0);
     Assert.IsTrue(target.Count >= 0);
     Assert.IsTrue(target.Count <= target.Capacity);
     Assert.IsTrue(target.IsConsistent());
 }
Ejemplo n.º 2
0
 public static void AssertInvariants <TPriority, TValue>(this BinaryHeap <TPriority, TValue> target)
 {
     Assert.IsTrue(target.Capacity >= 0, "Capacity test failed");
     Assert.IsTrue(target.Count >= 0, "Count test failed.");
     Assert.IsTrue(target.Count <= target.Capacity, "Count and capacity comparison failed.");
     Assert.IsTrue(target.IsConsistent(), "IsConsistent test failed.");
 }