Ejemplo n.º 1
0
 public virtual void TestSetBit()
 {
     for (int i = 0; i < 62; i++)
     {
         Assert.AreEqual(Math.Pow(2L, i), RegularCyclicVertexSearch.SetBit(0L, i));
     }
     Assert.AreEqual(long.MinValue, RegularCyclicVertexSearch.SetBit(0L, 63));
 }
Ejemplo n.º 2
0
        public virtual void TestSetBit_Universe()
        {
            long s = 0L;
            long t = ~s;

            for (int i = 0; i < 64; i++)
            {
                s = RegularCyclicVertexSearch.SetBit(s, i);
            }
            Assert.AreEqual(t, s);
        }