public void GetZeroOnEmptySet() { BigBitSet set = new BigBitSet(); Assert.IsFalse(set[0]); Assert.IsFalse(set[1]); Assert.IsFalse(set[ulong.MaxValue]); }
public void SetAndGetLastOnes() { BigBitSet set = new BigBitSet(); for (uint k = 0; k < 16; k++) set[ulong.MaxValue - k] = true; for (uint k = 0; k < 16; k++) Assert.IsTrue(set[ulong.MaxValue - k]); }
public void SetAndGetFirstOnes() { BigBitSet set = new BigBitSet(); for (uint k = 0; k < 16; k++) set[k] = true; for (uint k = 0; k < 16; k++) Assert.IsTrue(set[k]); }
public void SetAddMember(string key, ulong member) { BigBitSet set = (BigBitSet)this.values[key]; if (set == null) { set = new BigBitSet(); this.values[key] = set; } set[member] = true; }
public void SetOnesAndGetMiddleZeroes() { BigBitSet set = new BigBitSet(); for (uint k = 0; k < 16; k++) set[ulong.MaxValue - k] = true; for (uint k = 0; k < 16; k++) set[k] = true; for (uint k = 0; k < 256; k++) Assert.IsFalse(set[(ulong)(long.MaxValue - k)]); }