Fix unittest build in x86_64.
Some size_t values (generally resulting from X.size() calls) were
compared to off_t values (such as utils::FileSize()) which resulted
in a compile error on x86_64 targets. This patch fixes those issues
with explicit casts in the unittests since the range of the expected
values is small enough.
Bug: 26955860
TEST=`mma` on edison-eng and brilloemulator_x86_64-eng.
Change-Id: I2d09d356e1b97ab6527b17596fe20d425da6d519
diff --git a/payload_consumer/download_action_unittest.cc b/payload_consumer/download_action_unittest.cc
index 51d3c3a..d12b4ae 100644
--- a/payload_consumer/download_action_unittest.cc
+++ b/payload_consumer/download_action_unittest.cc
@@ -307,7 +307,8 @@
const off_t resulting_file_size(utils::FileSize(temp_file.GetPath()));
EXPECT_GE(resulting_file_size, 0);
if (resulting_file_size != 0)
- EXPECT_EQ(kMockHttpFetcherChunkSize, resulting_file_size);
+ EXPECT_EQ(kMockHttpFetcherChunkSize,
+ static_cast<size_t>(resulting_file_size));
}
} // namespace