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

Side by Side Diff: snapshot/mac/process_reader_test.cc

Issue 700143004: C++11: Use type aliases instead of typedefs (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « snapshot/mac/mach_o_image_symbol_table_reader.h ('k') | snapshot/mac/process_types.h » ('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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return nullptr; 282 return nullptr;
283 } 283 }
284 284
285 // This is a PointerVector because the address of a ThreadInfo object is 285 // This is a PointerVector because the address of a ThreadInfo object is
286 // passed to each thread’s ThreadMain(), so they cannot move around in memory. 286 // passed to each thread’s ThreadMain(), so they cannot move around in memory.
287 PointerVector<ThreadInfo> thread_infos_; 287 PointerVector<ThreadInfo> thread_infos_;
288 288
289 DISALLOW_COPY_AND_ASSIGN(TestThreadPool); 289 DISALLOW_COPY_AND_ASSIGN(TestThreadPool);
290 }; 290 };
291 291
292 typedef std::map<uint64_t, TestThreadPool::ThreadExpectation> ThreadMap; 292 using ThreadMap = std::map<uint64_t, TestThreadPool::ThreadExpectation>;
293 293
294 // Verifies that all of the threads in |threads|, obtained from ProcessReader, 294 // Verifies that all of the threads in |threads|, obtained from ProcessReader,
295 // agree with the expectation in |thread_map|. If |tolerate_extra_threads| is 295 // agree with the expectation in |thread_map|. If |tolerate_extra_threads| is
296 // true, |threads| is allowed to contain threads that are not listed in 296 // true, |threads| is allowed to contain threads that are not listed in
297 // |thread_map|. This is useful when testing situations where code outside of 297 // |thread_map|. This is useful when testing situations where code outside of
298 // the test’s control (such as system libraries) may start threads, or may have 298 // the test’s control (such as system libraries) may start threads, or may have
299 // started threads prior to a test’s execution. 299 // started threads prior to a test’s execution.
300 void ExpectSeveralThreads(ThreadMap* thread_map, 300 void ExpectSeveralThreads(ThreadMap* thread_map,
301 const std::vector<ProcessReader::Thread>& threads, 301 const std::vector<ProcessReader::Thread>& threads,
302 const bool tolerate_extra_threads) { 302 const bool tolerate_extra_threads) {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 }; 683 };
684 684
685 TEST(ProcessReader, ChildModules) { 685 TEST(ProcessReader, ChildModules) {
686 ProcessReaderModulesChild process_reader_modules_child; 686 ProcessReaderModulesChild process_reader_modules_child;
687 process_reader_modules_child.Run(); 687 process_reader_modules_child.Run();
688 } 688 }
689 689
690 } // namespace 690 } // namespace
691 } // namespace test 691 } // namespace test
692 } // namespace crashpad 692 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/mac/mach_o_image_symbol_table_reader.h ('k') | snapshot/mac/process_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698