| OLD | NEW |
| 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 <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/at_exit.h" | 15 #include "base/at_exit.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.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. |
| 27 int RunUnitTestsUsingBaseTestSuite(int argc, char **argv); | 27 int RunUnitTestsUsingBaseTestSuite(int argc, char **argv); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool created_feature_list_; | 85 bool created_feature_list_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(TestSuite); | 87 DISALLOW_COPY_AND_ASSIGN(TestSuite); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace base | 90 } // namespace base |
| 91 | 91 |
| 92 #endif // BASE_TEST_TEST_SUITE_H_ | 92 #endif // BASE_TEST_TEST_SUITE_H_ |
| OLD | NEW |