/** * Construct a region version holder that matches the seen revisions passed in the bit set. * */ private RegionVersionHolder buildHolder(BitSet bs) { // Createa version holder RegionVersionHolder vh = new RegionVersionHolder(member); // Record all of the version in the holder recordVersions(vh, bs); // Make sure the holder looks matches the bitset. compareWithBitSet(bs, vh); return vh; }
@Test public void testChangeSetForm() { try { RVVException.UseTreeSetsForTesting = true; // Create a bit set which matches the seen versions of vh1 BitSet bs1 = new BitSet(); bs1.set(1024); RegionVersionHolder vh1 = buildHolder(bs1); bs1.set(510); bs1.set(511); bs1.set(512); recordVersions(vh1, bs1); validateExceptions(vh1); compareWithBitSet(bs1, vh1); } finally { RVVException.UseTreeSetsForTesting = false; } }
compareWithBitSet(bs1, vh1); compareWithBitSet(bs1, vh2); validateExceptions(vh2);
compareWithBitSet(bs1, vh2); validateExceptions(vh2); compareWithBitSet(bs1, vh2); compareWithBitSet(bs1, vh4);