testBitSet more diag output

This commit is contained in:
Michael Davidsaver
2016-02-17 10:09:47 -05:00
parent b5c1b9178d
commit 5b07ecbd01

View File

@@ -100,13 +100,13 @@ static void testOperators()
b1.set(1);
testOk1(!(b1 == b2));
// different internal length, but the same
testDiag("different internal length, but the same");
b2.set(100);
b2.set(1);
b2.flip(100);
testOk1(b1 == b2);
// OR test
testDiag("OR test");
b2.set(65);
b2.set(106);
b2.set(105);
@@ -118,12 +118,12 @@ static void testOperators()
str = toString(b1);
testOk1(str == "{1, 65, 105, 106}");
// AND test
testDiag("AND test");
b1.set(128);
b1 &= b2;
testOk1(b1 == b2);
// XOR test
testDiag("XOR test");
b1.set(128);
b1 ^= b2;
testOk1((b1.cardinality() == 1 && b1.get(128) == true));
@@ -135,11 +135,11 @@ static void testOperators()
testOk1((b1.cardinality() == 2 && b1.get(1) == true && b1.get(256) == true));
// assign
testDiag("assign");
b1 = b2;
testOk1(b1 == b2);
// or_and
testDiag("or_and");
b1.clear(); b1.set(2);
b2.clear(); b2.set(66); b2.set(128);
BitSet b3; b3.set(128); b3.set(520);