public void TestGetSet() { var index = new SparseBitArray32(65536 * 32, 32); index[10] = true; index[100] = true; index[1000] = true; index[10000] = true; index[100000] = true; Assert.IsTrue(index[10]); Assert.IsTrue(index[100]); Assert.IsTrue(index[1000]); Assert.IsTrue(index[10000]); Assert.IsTrue(index[100000]); }
public void TestEnumeration() { var index = new SparseBitArray32(65536 * 32, 32); index[10] = true; index[100] = true; index[1000] = true; index[10000] = true; index[100000] = true; var list = new List <long>(index); Assert.AreEqual(5, list.Count); Assert.IsTrue(list.Contains(10)); Assert.IsTrue(list.Contains(100)); Assert.IsTrue(list.Contains(1000)); Assert.IsTrue(list.Contains(10000)); Assert.IsTrue(list.Contains(100000)); }