public void HelpMethodsTestRand() { int i = rand.Next() % (int)Math.Sqrt(Int32.MaxValue); int j = rand.Next() % (i + 1); Assert.AreEqual((i, j), Beap <int> .Index2RowCol(Beap <int> .RowCol2Index(i, j))); int k = rand.Next(); Assert.AreEqual(k, Beap <int> .RowCol2Index(Beap <int> .Index2RowCol(k).Item1, Beap <int> .Index2RowCol(k).Item2)); }
public void HelpMethodsTest2() { Assert.AreEqual(4, Beap <int> .RowCol2Index(2, 1)); Assert.AreEqual((2, 1), Beap <int> .Index2RowCol(4)); }
public void HelpMethodsTest3() { Assert.AreEqual(3, Beap <int> .RowCol2Index(2, 0)); Assert.AreEqual((2, 0), Beap <int> .Index2RowCol(3)); }
public void HelpMethodsTest1() { Assert.AreEqual(5, Beap <int> .RowCol2Index(2, 2)); Assert.AreEqual((2, 2), Beap <int> .Index2RowCol(5)); }