Exemplo n.º 1
0
 public void UpperBitsUnset()
 {
     for (int a = 0; a < 5; a++)      // number of words
     {
         for (int b = -1; b < 2; b++) // number of bits more or less than that number of words
         {
             int n = BitArray.BitsPerWord * a + b;
             if (n < 0)
             {
                 continue;
             }
             BitArray arr = BitArray.AllSet(n);
             if (n > 0)
             {
                 Assert.True(arr[n - 1]);
             }
             Assert.False(arr[n]);
         }
     }
 }