Commit 0ebc0a39 authored by brucedawson's avatar brucedawson Committed by Commit bot

Fixing loop to count up from the bottom instead of the top.

The loop that adds prefixes from 1 billion to 3 billion has been broken
since it was modified in Feb 27, 2014, change 2b59b0a6. It didn't survive
the change from signed to unsigned integers meaning that this test
function has effectively been disabled.

This bug was found by VC++'s /analyze which said:
src\chrome\browser\safe_browsing\prefix_set_unittest.cc(280) :
warning C6294: Ill-defined for-loop:
initial condition does not satisfy test.  Loop body not executed.

BUG=427616

Review URL: https://codereview.chromium.org/779163002

Cr-Commit-Position: refs/heads/master@{#307071}
parent cc4b8cf2
......@@ -277,8 +277,8 @@ TEST_F(PrefixSetTest, AllBig) {
std::vector<SBPrefix> prefixes;
const unsigned kDelta = 10 * 1000 * 1000;
for (SBPrefix prefix = kHighBitSet;
prefix < kHighBitClear; prefix += kDelta) {
for (SBPrefix prefix = kHighBitClear;
prefix < kHighBitSet; prefix += kDelta) {
prefixes.push_back(prefix);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment