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

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

Issue 542893002: Add trace-to-file support for base::TestSuite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded include Created 6 years, 3 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
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 <string> 12 #include <string>
13 13
14 #include "base/at_exit.h" 14 #include "base/at_exit.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/test/trace_to_file.h"
16 17
17 namespace testing { 18 namespace testing {
18 class TestInfo; 19 class TestInfo;
19 } 20 }
20 21
21 namespace base { 22 namespace base {
22 23
23 // Instantiates TestSuite, runs it and returns exit code. 24 // Instantiates TestSuite, runs it and returns exit code.
24 int RunUnitTestsUsingBaseTestSuite(int argc, char **argv); 25 int RunUnitTestsUsingBaseTestSuite(int argc, char **argv);
25 26
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 74
74 private: 75 private:
75 void InitializeFromCommandLine(int argc, char** argv); 76 void InitializeFromCommandLine(int argc, char** argv);
76 #if defined(OS_WIN) 77 #if defined(OS_WIN)
77 void InitializeFromCommandLine(int argc, wchar_t** argv); 78 void InitializeFromCommandLine(int argc, wchar_t** argv);
78 #endif // defined(OS_WIN) 79 #endif // defined(OS_WIN)
79 80
80 // Basic initialization for the test suite happens here. 81 // Basic initialization for the test suite happens here.
81 void PreInitialize(bool create_at_exit_manager); 82 void PreInitialize(bool create_at_exit_manager);
82 83
84 test::TraceToFile trace_to_file_;
85
83 bool initialized_command_line_; 86 bool initialized_command_line_;
84 87
85 DISALLOW_COPY_AND_ASSIGN(TestSuite); 88 DISALLOW_COPY_AND_ASSIGN(TestSuite);
86 }; 89 };
87 90
88 } // namespace base 91 } // namespace base
89 92
90 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile 93 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile
91 // until we can update it to use "base::" (preventing a two-sided patch). 94 // until we can update it to use "base::" (preventing a two-sided patch).
92 using base::TestSuite; 95 using base::TestSuite;
93 96
94 #endif // BASE_TEST_TEST_SUITE_H_ 97 #endif // BASE_TEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « base/test/BUILD.gn ('k') | base/test/test_suite.cc » ('j') | base/test/trace_to_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698