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 21 matching lines...) Expand all Loading... |
32 extern const char kGTestOutputFlag[]; | 32 extern const char kGTestOutputFlag[]; |
33 | 33 |
34 // Structure containing result of a single test. | 34 // Structure containing result of a single test. |
35 struct TestResult { | 35 struct TestResult { |
36 enum Status { | 36 enum Status { |
37 TEST_UNKNOWN, // Status not set. | 37 TEST_UNKNOWN, // Status not set. |
38 TEST_SUCCESS, // Test passed. | 38 TEST_SUCCESS, // Test passed. |
39 TEST_FAILURE, // Assertion failure (think EXPECT_TRUE, not DCHECK). | 39 TEST_FAILURE, // Assertion failure (think EXPECT_TRUE, not DCHECK). |
40 TEST_TIMEOUT, // Test timed out and was killed. | 40 TEST_TIMEOUT, // Test timed out and was killed. |
41 TEST_CRASH, // Test crashed (includes CHECK/DCHECK failures). | 41 TEST_CRASH, // Test crashed (includes CHECK/DCHECK failures). |
| 42 TEST_SKIPPED, // Test skipped (not run at all). |
42 }; | 43 }; |
43 | 44 |
44 TestResult(); | 45 TestResult(); |
45 | 46 |
46 std::string GetFullName() const { return test_case_name + "." + test_name; } | 47 std::string GetFullName() const { return test_case_name + "." + test_name; } |
47 | 48 |
48 // Returns true if the test has completed (i.e. the test binary exited | 49 // Returns true if the test has completed (i.e. the test binary exited |
49 // normally, possibly with an exit code indicating failure, but didn't crash | 50 // normally, possibly with an exit code indicating failure, but didn't crash |
50 // or time out in the middle of the test). | 51 // or time out in the middle of the test). |
51 bool completed() const { | 52 bool completed() const { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 130 |
130 // Launches GTest-based tests from the current executable | 131 // Launches GTest-based tests from the current executable |
131 // using |launcher_delegate|. | 132 // using |launcher_delegate|. |
132 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 133 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
133 int argc, | 134 int argc, |
134 char** argv) WARN_UNUSED_RESULT; | 135 char** argv) WARN_UNUSED_RESULT; |
135 | 136 |
136 } // namespace base | 137 } // namespace base |
137 | 138 |
138 #endif // BASE_TEST_TEST_LAUNCHER_H_ | 139 #endif // BASE_TEST_TEST_LAUNCHER_H_ |
OLD | NEW |