From d8b67f49d7f8ae291cd4fa901b2d3767137704e7 Mon Sep 17 00:00:00 2001 From: Amin Hassani Date: Wed, 6 Dec 2017 13:47:52 -0800 Subject: update_engine: Remove the duplicate BlocksInExtents This patch removes the duplicate BlocksInExtents from extent_utils.h and fixes the remainder of the code to reflect this change. BUG=none TEST=unittests pass; Change-Id: I76f5106f75072b20cd8f41f081b2f2b07aeac9a8 Reviewed-on: https://chromium-review.googlesource.com/812009 Commit-Ready: Amin Hassani Tested-by: Amin Hassani Reviewed-by: Ben Chan Reviewed-by: Alex Deymo Reviewed-by: Sen Jiang --- payload_generator/full_update_generator_unittest.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'payload_generator/full_update_generator_unittest.cc') diff --git a/payload_generator/full_update_generator_unittest.cc b/payload_generator/full_update_generator_unittest.cc index 9e62de28..6da4d109 100644 --- a/payload_generator/full_update_generator_unittest.cc +++ b/payload_generator/full_update_generator_unittest.cc @@ -16,6 +16,7 @@ #include "update_engine/payload_generator/full_update_generator.h" +#include #include #include @@ -116,9 +117,9 @@ TEST_F(FullUpdateGeneratorTest, ChunkSizeTooBig) { // new_part has one chunk and a half. EXPECT_EQ(2U, aops.size()); EXPECT_EQ(config_.hard_chunk_size / config_.block_size, - BlocksInExtents(aops[0].op.dst_extents())); + utils::BlocksInExtents(aops[0].op.dst_extents())); EXPECT_EQ((new_part.size() - config_.hard_chunk_size) / config_.block_size, - BlocksInExtents(aops[1].op.dst_extents())); + utils::BlocksInExtents(aops[1].op.dst_extents())); } // Test that if the image size is much smaller than the chunk size, it handles @@ -138,7 +139,7 @@ TEST_F(FullUpdateGeneratorTest, ImageSizeTooSmall) { // new_part has less than one chunk. EXPECT_EQ(1U, aops.size()); EXPECT_EQ(new_part.size() / config_.block_size, - BlocksInExtents(aops[0].op.dst_extents())); + utils::BlocksInExtents(aops[0].op.dst_extents())); } } // namespace chromeos_update_engine -- cgit v1.2.3