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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // Constants for GTest command-line flags. | 24 // Constants for GTest command-line flags. |
25 extern const char kGTestFilterFlag[]; | 25 extern const char kGTestFilterFlag[]; |
26 extern const char kGTestListTestsFlag[]; | 26 extern const char kGTestListTestsFlag[]; |
27 extern const char kGTestRepeatFlag[]; | 27 extern const char kGTestRepeatFlag[]; |
28 extern const char kGTestRunDisabledTestsFlag[]; | 28 extern const char kGTestRunDisabledTestsFlag[]; |
29 extern const char kGTestOutputFlag[]; | 29 extern const char kGTestOutputFlag[]; |
30 | 30 |
31 // Structure containing result of a single test. | 31 // Structure containing result of a single test. |
32 struct TestResult { | 32 struct TestResult { |
| 33 std::string GetFullName() const { return test_case_name + "." + test_name; } |
| 34 |
33 TestResult(); | 35 TestResult(); |
34 | 36 |
35 // 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"). |
36 std::string test_case_name; | 38 std::string test_case_name; |
37 | 39 |
38 // 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"). |
39 std::string test_name; | 41 std::string test_name; |
40 | 42 |
41 // True if the test passed. | 43 // True if the test passed. |
42 bool success; | 44 bool success; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 85 |
84 // Launches GTest-based tests from the current executable | 86 // Launches GTest-based tests from the current executable |
85 // using |launcher_delegate|. | 87 // using |launcher_delegate|. |
86 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 88 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
87 int argc, | 89 int argc, |
88 char** argv) WARN_UNUSED_RESULT; | 90 char** argv) WARN_UNUSED_RESULT; |
89 | 91 |
90 } // namespace base | 92 } // namespace base |
91 | 93 |
92 #endif // BASE_TEST_TEST_LAUNCHER_H_ | 94 #endif // BASE_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |