Commit 0e783f89 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Fix MSVC signed/unsigned comparison warning in windowed_analyzer_unittest.cc

TBR=brianderson

Bug: none
Change-Id: I3951025d11cf4d0be8308fcacfabcf73866c9291
Reviewed-on: https://chromium-review.googlesource.com/975121Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545035}
parent a9180739
......@@ -99,10 +99,11 @@ TEST(FrameMetricsWindowedAnalyzerTest, AllResultsTheSame) {
// Try adding a single sample vs. multiple samples.
for (size_t samples : {1u, 100u}) {
// A power of 2 sweep for both the value and weight dimensions.
for (uint64_t value = 1; value < 0x100000000; value *= 2) {
for (uint64_t value = 1; value < 0x100000000ULL; value *= 2) {
// Adding too many samples can result in overflow when multiplied by the
// weight. Divide by samples to avoid overflow.
for (uint64_t weight = 1; weight < 0x100000000 / samples; weight *= 2) {
for (uint64_t weight = 1; weight < 0x100000000ULL / samples;
weight *= 2) {
WindowedAnalyzer analyzer(&client, &shared_client);
AddSamplesHelper(&analyzer, value, weight, samples);
uint64_t expected_value =
......
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