Fix missing return values in bitset_utils.h
This patch adds the missing return value *this in the operator=
of class BitSetT
BUG=angleproject:1814
Change-Id: I758d62e80e4ade92aac64315f1808ca1eabdc787
Reviewed-on: https://chromium-review.googlesource.com/487423
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/common/bitset_utils_unittest.cpp b/src/common/bitset_utils_unittest.cpp
index e176c70..3394890 100644
--- a/src/common/bitset_utils_unittest.cpp
+++ b/src/common/bitset_utils_unittest.cpp
@@ -89,4 +89,24 @@
EXPECT_EQ((mStateBits & otherBits).count(), seenBits.size());
}
+// Test bit assignments.
+TEST_F(BitSetIteratorTest, BitAssignment)
+{
+ std::set<size_t> originalValues;
+ originalValues.insert(2);
+ originalValues.insert(6);
+ originalValues.insert(8);
+ originalValues.insert(35);
+
+ for (size_t value : originalValues)
+ {
+ (mStateBits[value] = false) = true;
+ }
+
+ for (size_t value : originalValues)
+ {
+ EXPECT_TRUE(mStateBits.test(value));
+ }
+}
+
} // anonymous namespace