Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1928)

Unified Diff: delta_diff_generator_unittest.cc

Issue 5548002: AU: When generating delta, use scratch off end of filesystem (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« delta_diff_generator.cc ('K') | « delta_diff_generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_diff_generator_unittest.cc
diff --git a/delta_diff_generator_unittest.cc b/delta_diff_generator_unittest.cc
index 4a11c52904dc55fe0b72babeb79cfd905ef6e172..2a703994b66ecfa4bd7fc4656342b65295e45ece 100644
--- a/delta_diff_generator_unittest.cc
+++ b/delta_diff_generator_unittest.cc
@@ -525,7 +525,8 @@ TEST_F(DeltaDiffGeneratorTest, RunAsRootAssignTempBlocksTest) {
temp_dir,
fd,
&data_file_size,
- &final_order));
+ &final_order,
+ Vertex::kInvalidIndex));
Graph expected_graph(12);
@@ -728,4 +729,16 @@ TEST_F(DeltaDiffGeneratorTest, RunAsRootAssignTempBlocksReuseTest) {
EXPECT_EQ(OP_REPLACE_BZ, graph[5].op.type());
}
+TEST_F(DeltaDiffGeneratorTest, CreateScratchNodeTest) {
+ Vertex vertex;
+ DeltaDiffGenerator::CreateScratchNode(12, 34, &vertex);
+ EXPECT_EQ(DeltaArchiveManifest_InstallOperation_Type_REPLACE_BZ,
+ vertex.op.type());
+ EXPECT_EQ(0, vertex.op.data_offset());
+ EXPECT_EQ(0, vertex.op.data_length());
+ EXPECT_EQ(1, vertex.op.dst_extents_size());
+ EXPECT_EQ(12, vertex.op.dst_extents(0).start_block());
+ EXPECT_EQ(34, vertex.op.dst_extents(0).num_blocks());
+}
+
} // namespace chromeos_update_engine
« delta_diff_generator.cc ('K') | « delta_diff_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698