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

Side by Side Diff: third_party/zlib/google/zip_unittest.cc

Issue 1552513002: Switch to standard integer types in third_party/zlib/google/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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 unified diff | Download patch
« no previous file with comments | « third_party/zlib/google/zip_reader_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h>
6 #include <stdint.h>
7
5 #include <set> 8 #include <set>
6 #include <string> 9 #include <string>
7 #include <vector> 10 #include <vector>
8 11
9 #include "base/files/file.h" 12 #include "base/files/file.h"
10 #include "base/files/file_enumerator.h" 13 #include "base/files/file_enumerator.h"
11 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
13 #include "base/files/scoped_temp_dir.h" 16 #include "base/files/scoped_temp_dir.h"
14 #include "base/path_service.h" 17 #include "base/path_service.h"
15 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
16 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
20 #include "build/build_config.h"
17 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
18 #include "testing/platform_test.h" 22 #include "testing/platform_test.h"
19 #include "third_party/zlib/google/zip.h" 23 #include "third_party/zlib/google/zip.h"
20 #include "third_party/zlib/google/zip_reader.h" 24 #include "third_party/zlib/google/zip_reader.h"
21 25
22 namespace { 26 namespace {
23 27
24 // Make the test a PlatformTest to setup autorelease pools properly on Mac. 28 // Make the test a PlatformTest to setup autorelease pools properly on Mac.
25 class ZipTest : public PlatformTest { 29 class ZipTest : public PlatformTest {
26 protected: 30 protected:
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir()); 322 ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
319 const base::FilePath& temp_dir = scoped_temp_dir.path(); 323 const base::FilePath& temp_dir = scoped_temp_dir.path();
320 324
321 ASSERT_TRUE(zip::Unzip(test_zip_file, temp_dir)); 325 ASSERT_TRUE(zip::Unzip(test_zip_file, temp_dir));
322 EXPECT_TRUE(base::DirectoryExists(temp_dir.AppendASCII("d"))); 326 EXPECT_TRUE(base::DirectoryExists(temp_dir.AppendASCII("d")));
323 327
324 for (int i = 0; i < 8; i++) { 328 for (int i = 0; i < 8; i++) {
325 SCOPED_TRACE(base::StringPrintf("Processing %d.txt", i)); 329 SCOPED_TRACE(base::StringPrintf("Processing %d.txt", i));
326 base::FilePath file_path = temp_dir.AppendASCII( 330 base::FilePath file_path = temp_dir.AppendASCII(
327 base::StringPrintf("%d.txt", i)); 331 base::StringPrintf("%d.txt", i));
328 int64 file_size = -1; 332 int64_t file_size = -1;
329 EXPECT_TRUE(base::GetFileSize(file_path, &file_size)); 333 EXPECT_TRUE(base::GetFileSize(file_path, &file_size));
330 EXPECT_EQ(static_cast<int64>(i), file_size); 334 EXPECT_EQ(static_cast<int64_t>(i), file_size);
331 } 335 }
332 } 336 }
333 337
334 } // namespace 338 } // namespace
OLDNEW
« no previous file with comments | « third_party/zlib/google/zip_reader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698