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

Unified Diff: src/platform/update_engine/file_writer_unittest.cc

Issue 466036: AU: Beginnings of delta support (Closed)
Patch Set: Created 11 years 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
« no previous file with comments | « src/platform/update_engine/file_writer.h ('k') | src/platform/update_engine/gen_coverage_html.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/file_writer_unittest.cc
diff --git a/src/platform/update_engine/file_writer_unittest.cc b/src/platform/update_engine/file_writer_unittest.cc
index ed8bcaa54527f1c07624fa435fae2d2867530b9a..6e494ecf4e1091428d28e78e1a5431cf38b06e7b 100644
--- a/src/platform/update_engine/file_writer_unittest.cc
+++ b/src/platform/update_engine/file_writer_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <string>
@@ -9,6 +10,7 @@
#include <gtest/gtest.h>
#include "update_engine/file_writer.h"
#include "update_engine/test_utils.h"
+#include "update_engine/utils.h"
using std::string;
using std::vector;
@@ -24,7 +26,8 @@ TEST(FileWriterTest, SimpleTest) {
O_CREAT | O_LARGEFILE | O_TRUNC | O_WRONLY,
0644));
ASSERT_EQ(4, file_writer.Write("test", 4));
- vector<char> actual_data = ReadFile(path);
+ vector<char> actual_data;
+ EXPECT_TRUE(utils::ReadFile(path, &actual_data));
EXPECT_FALSE(memcmp("test", &actual_data[0], actual_data.size()));
EXPECT_EQ(0, file_writer.Close());
« no previous file with comments | « src/platform/update_engine/file_writer.h ('k') | src/platform/update_engine/gen_coverage_html.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698