From 62893e33e9cf2da6035ceb3726ab5d6ae91dc784 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 17 Feb 2016 10:12:04 -0500 Subject: [PATCH] testBitSet: demo bug in BitSet::or_and Incorrect handling of wordsInUse truncates if RHS (b1 & b2) is shorter than LHS (b3). --- testApp/misc/testBitSet.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testApp/misc/testBitSet.cpp b/testApp/misc/testBitSet.cpp index 3867062..005e1ba 100644 --- a/testApp/misc/testBitSet.cpp +++ b/testApp/misc/testBitSet.cpp @@ -146,6 +146,15 @@ static void testOperators() b1.or_and(b2, b3); str = toString(b1); testOk1(str == "{2, 128}"); + + b1.clear(); b1.set(1); + b2.clear(); + b3.clear(); b3.set(1); + std::cout<<"# "<