public void Less() { long[] prev = new long[] { 1, 1, 2, 2 }; long[] curr = new long[] { 1, 1, 2, 2 }; Assert.IsFalse(InvariantRanker.Less(0, 1, curr, prev)); Assert.IsFalse(InvariantRanker.Less(2, 3, curr, prev)); Assert.IsTrue(InvariantRanker.Less(0, 2, curr, prev)); Assert.IsTrue(InvariantRanker.Less(0, 3, curr, prev)); Assert.IsTrue(InvariantRanker.Less(1, 2, curr, prev)); Assert.IsTrue(InvariantRanker.Less(1, 3, curr, prev)); }
public void LessUsingPrev() { long[] prev = new long[] { 1, 1, 2, 2 }; long[] curr = new long[] { 1, 2, 1, 2 }; // 0,1 and 2,3 are only less is we inspect the 'curr' invariants Assert.IsTrue(InvariantRanker.Less(0, 1, curr, prev)); Assert.IsTrue(InvariantRanker.Less(2, 3, curr, prev)); // these values are only less inspecting the first invariants Assert.IsTrue(InvariantRanker.Less(0, 2, curr, prev)); Assert.IsTrue(InvariantRanker.Less(0, 3, curr, prev)); Assert.IsTrue(InvariantRanker.Less(1, 2, curr, prev)); Assert.IsTrue(InvariantRanker.Less(1, 3, curr, prev)); }