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; } }
/** * 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; }
compareWithBitSet(bs1, vh1); compareWithBitSet(bs1, vh2); validateExceptions(vh2);
compareWithBitSet(bs1, vh2); validateExceptions(vh2); compareWithBitSet(bs1, vh2); compareWithBitSet(bs1, vh4); vh1.addException(100,106); assertTrue(vh2.sameAs(vh1)); compareWithBitSet(bs2, vh2); validateExceptions(vh2);