| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ | 5 #ifndef BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ |
| 6 #define BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ | 6 #define BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 | 11 |
| 12 // Callback that runs a test suite and returns exit code. | 12 // Callback that runs a test suite and returns exit code. |
| 13 typedef base::Callback<int(void)> RunTestSuiteCallback; | 13 typedef base::Callback<int(void)> RunTestSuiteCallback; |
| 14 | 14 |
| 15 // Launches unit tests in given test suite. Returns exit code. | 15 // Launches unit tests in given test suite. Returns exit code. |
| 16 int LaunchUnitTests(int argc, | 16 int LaunchUnitTests(int argc, |
| 17 char** argv, | 17 char** argv, |
| 18 const RunTestSuiteCallback& run_test_suite); | 18 const RunTestSuiteCallback& run_test_suite); |
| 19 | 19 |
| 20 // Same as above, but always runs tests serially. | 20 // Same as above, but always runs tests serially. |
| 21 int LaunchUnitTestsSerially(int argc, | 21 int LaunchUnitTestsSerially(int argc, |
| 22 char** argv, | 22 char** argv, |
| 23 const RunTestSuiteCallback& run_test_suite); | 23 const RunTestSuiteCallback& run_test_suite); |
| 24 | 24 |
| 25 #if defined(OS_WIN) |
| 26 // Launches unit tests in given test suite. Returns exit code. |
| 27 // |use_job_objects| determines whether to use job objects. |
| 28 int LaunchUnitTests(int argc, |
| 29 wchar_t** argv, |
| 30 bool use_job_objects, |
| 31 const RunTestSuiteCallback& run_test_suite); |
| 32 #endif // defined(OS_WIN) |
| 33 |
| 25 } // namespace base | 34 } // namespace base |
| 26 | 35 |
| 27 #endif // BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ | 36 #endif // BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ |
| OLD | NEW |