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

Unified Diff: base/files/file_unittest.cc

Issue 1549853002: Switch to standard integer types in base/files/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 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 | « base/files/file_tracing.cc ('k') | base/files/file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_unittest.cc
diff --git a/base/files/file_unittest.cc b/base/files/file_unittest.cc
index 909bacb29354847dfb0e68822d1ac54979bc171d..2445f7e1282587e1cb71bc7775458b1d4fa4dce0 100644
--- a/base/files/file_unittest.cc
+++ b/base/files/file_unittest.cc
@@ -4,11 +4,14 @@
#include "base/files/file.h"
+#include <stdint.h>
+
#include <utility>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::File;
@@ -202,7 +205,7 @@ TEST(FileTest, ReadWrite) {
EXPECT_EQ(kPartialWriteLength, bytes_written);
// Make sure the file was extended.
- int64 file_size = 0;
+ int64_t file_size = 0;
EXPECT_TRUE(GetFileSize(file_path, &file_size));
EXPECT_EQ(kOffsetBeyondEndOfFile + kPartialWriteLength, file_size);
@@ -284,7 +287,7 @@ TEST(FileTest, Length) {
// Extend the file.
const int kExtendedFileLength = 10;
- int64 file_size = 0;
+ int64_t file_size = 0;
EXPECT_TRUE(file.SetLength(kExtendedFileLength));
EXPECT_EQ(kExtendedFileLength, file.GetLength());
EXPECT_TRUE(GetFileSize(file_path, &file_size));
@@ -437,7 +440,7 @@ TEST(FileTest, Seek) {
base::File::FLAG_WRITE);
ASSERT_TRUE(file.IsValid());
- const int64 kOffset = 10;
+ const int64_t kOffset = 10;
EXPECT_EQ(kOffset, file.Seek(base::File::FROM_BEGIN, kOffset));
EXPECT_EQ(2 * kOffset, file.Seek(base::File::FROM_CURRENT, kOffset));
EXPECT_EQ(kOffset, file.Seek(base::File::FROM_CURRENT, -kOffset));
« no previous file with comments | « base/files/file_tracing.cc ('k') | base/files/file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698