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

Side by Side Diff: base/test/test_suite.h

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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 | « base/test/test_reg_util_win_unittest.cc ('k') | base/test/test_suite.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_TEST_TEST_SUITE_H_ 5 #ifndef BASE_TEST_TEST_SUITE_H_
6 #define BASE_TEST_TEST_SUITE_H_ 6 #define BASE_TEST_TEST_SUITE_H_
7 7
8 // Defines a basic test suite framework for running gtest based tests. You can 8 // Defines a basic test suite framework for running gtest based tests. You can
9 // instantiate this class in your main function and call its Run method to run 9 // instantiate this class in your main function and call its Run method to run
10 // any gtest based tests that are linked into your executable. 10 // any gtest based tests that are linked into your executable.
11 11
12 #include <memory>
12 #include <string> 13 #include <string>
13 14
14 #include "base/at_exit.h" 15 #include "base/at_exit.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/test/trace_to_file.h" 17 #include "base/test/trace_to_file.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 19
20 namespace testing { 20 namespace testing {
21 class TestInfo; 21 class TestInfo;
22 } 22 }
23 23
24 namespace base { 24 namespace base {
25 25
26 // Instantiates TestSuite, runs it and returns exit code. 26 // Instantiates TestSuite, runs it and returns exit code.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual void SuppressErrorDialogs(); 60 virtual void SuppressErrorDialogs();
61 61
62 // Override these for custom initialization and shutdown handling. Use these 62 // Override these for custom initialization and shutdown handling. Use these
63 // instead of putting complex code in your constructor/destructor. 63 // instead of putting complex code in your constructor/destructor.
64 64
65 virtual void Initialize(); 65 virtual void Initialize();
66 virtual void Shutdown(); 66 virtual void Shutdown();
67 67
68 // Make sure that we setup an AtExitManager so Singleton objects will be 68 // Make sure that we setup an AtExitManager so Singleton objects will be
69 // destroyed. 69 // destroyed.
70 scoped_ptr<base::AtExitManager> at_exit_manager_; 70 std::unique_ptr<base::AtExitManager> at_exit_manager_;
71 71
72 private: 72 private:
73 void InitializeFromCommandLine(int argc, char** argv); 73 void InitializeFromCommandLine(int argc, char** argv);
74 #if defined(OS_WIN) 74 #if defined(OS_WIN)
75 void InitializeFromCommandLine(int argc, wchar_t** argv); 75 void InitializeFromCommandLine(int argc, wchar_t** argv);
76 #endif // defined(OS_WIN) 76 #endif // defined(OS_WIN)
77 77
78 // Basic initialization for the test suite happens here. 78 // Basic initialization for the test suite happens here.
79 void PreInitialize(); 79 void PreInitialize();
80 80
81 test::TraceToFile trace_to_file_; 81 test::TraceToFile trace_to_file_;
82 82
83 bool initialized_command_line_; 83 bool initialized_command_line_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(TestSuite); 85 DISALLOW_COPY_AND_ASSIGN(TestSuite);
86 }; 86 };
87 87
88 } // namespace base 88 } // namespace base
89 89
90 #endif // BASE_TEST_TEST_SUITE_H_ 90 #endif // BASE_TEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « base/test/test_reg_util_win_unittest.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698