BitSet: truncation in or_and

For "this |= set1 & set2" the result size
should be "max(this, min(set1, set2))" while
at present it is "min(set1, set2)" resulting
in truncation if the LHS is longer than the
RHS.
This commit is contained in:
Michael Davidsaver committed 2016-02-17 10:17:21 -05:00
1 parent 62893e33e9
commit d4292d81f2
2 files changed
+2 -3

No files matched your search

-2
View File
@@ -152,9 +152,7 @@ static void testOperators()
b3.clear(); b3.set(1);
std::cout<<"# "<<toString(b3)<<" |= "<<toString(b1)<<" & "<<toString(b2)<<"\n";
b3.or_and(b1, b2);
testTodoBegin("Bug in or_and");
testOk(toString(b3) == "{1}", "%s == {1}", toString(b3).c_str());
testTodoEnd();
}