| 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_TEST_LAUNCHER_H_ | 5 #ifndef BASE_TEST_TEST_LAUNCHER_H_ |
| 6 #define BASE_TEST_TEST_LAUNCHER_H_ | 6 #define BASE_TEST_TEST_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Name of the test case (before the dot, e.g. "A" for test "A.B"). | 37 // Name of the test case (before the dot, e.g. "A" for test "A.B"). |
| 38 std::string test_case_name; | 38 std::string test_case_name; |
| 39 | 39 |
| 40 // Name of the test (after the dot, e.g. "B" for test "A.B"). | 40 // Name of the test (after the dot, e.g. "B" for test "A.B"). |
| 41 std::string test_name; | 41 std::string test_name; |
| 42 | 42 |
| 43 // True if the test passed. | 43 // True if the test passed. |
| 44 bool success; | 44 bool success; |
| 45 | 45 |
| 46 // True if the test binary crashed while executing this test (i.e. the test |
| 47 // didn't actually finish). |
| 48 bool crashed; |
| 49 |
| 46 // Time it took to run the test. | 50 // Time it took to run the test. |
| 47 base::TimeDelta elapsed_time; | 51 base::TimeDelta elapsed_time; |
| 48 }; | 52 }; |
| 49 | 53 |
| 50 // Interface for use with LaunchTests that abstracts away exact details | 54 // Interface for use with LaunchTests that abstracts away exact details |
| 51 // which tests and how are run. | 55 // which tests and how are run. |
| 52 class TestLauncherDelegate { | 56 class TestLauncherDelegate { |
| 53 public: | 57 public: |
| 54 // Called before a test is considered for running. If it returns false, | 58 // Called before a test is considered for running. If it returns false, |
| 55 // the test is not run. If it returns true, the test will be run provided | 59 // the test is not run. If it returns true, the test will be run provided |
| (...skipping 29 matching lines...) Expand all Loading... |
| 85 | 89 |
| 86 // Launches GTest-based tests from the current executable | 90 // Launches GTest-based tests from the current executable |
| 87 // using |launcher_delegate|. | 91 // using |launcher_delegate|. |
| 88 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 92 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
| 89 int argc, | 93 int argc, |
| 90 char** argv) WARN_UNUSED_RESULT; | 94 char** argv) WARN_UNUSED_RESULT; |
| 91 | 95 |
| 92 } // namespace base | 96 } // namespace base |
| 93 | 97 |
| 94 #endif // BASE_TEST_TEST_LAUNCHER_H_ | 98 #endif // BASE_TEST_TEST_LAUNCHER_H_ |
| OLD | NEW |