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

Side by Side Diff: base/debug/crash_logging_unittest.cc

Issue 1549043002: Switch to standard integer types in base/debug/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « base/debug/crash_logging.h ('k') | base/debug/debugger.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/debug/crash_logging.h" 5 #include "base/debug/crash_logging.h"
6 6
7 #include <stddef.h>
8
7 #include <map> 9 #include <map>
8 #include <string> 10 #include <string>
9 11
10 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
12 15
13 namespace { 16 namespace {
14 17
15 std::map<std::string, std::string>* key_values_ = NULL; 18 std::map<std::string, std::string>* key_values_ = NULL;
16 19
17 } // namespace 20 } // namespace
18 21
19 class CrashLoggingTest : public testing::Test { 22 class CrashLoggingTest : public testing::Test {
20 public: 23 public:
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 EXPECT_EQ("wor", results[2]); 176 EXPECT_EQ("wor", results[2]);
174 EXPECT_EQ("ld", results[3]); 177 EXPECT_EQ("ld", results[3]);
175 } 178 }
176 179
177 TEST_F(CrashLoggingTest, ChunkRounding) { 180 TEST_F(CrashLoggingTest, ChunkRounding) {
178 // If max_length=12 and max_chunk_length=5, there should be 3 chunks, 181 // If max_length=12 and max_chunk_length=5, there should be 3 chunks,
179 // not 2. 182 // not 2.
180 base::debug::CrashKey key = { "round", 12 }; 183 base::debug::CrashKey key = { "round", 12 };
181 EXPECT_EQ(3u, base::debug::InitCrashKeys(&key, 1, 5)); 184 EXPECT_EQ(3u, base::debug::InitCrashKeys(&key, 1, 5));
182 } 185 }
OLDNEW
« no previous file with comments | « base/debug/crash_logging.h ('k') | base/debug/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698