| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GTEST_UTIL_H_ | 5 #ifndef BASE_TEST_GTEST_UTIL_H_ |
| 6 #define BASE_TEST_GTEST_UTIL_H_ | 6 #define BASE_TEST_GTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 | 15 |
| 16 class FilePath; | 16 class FilePath; |
| 17 | 17 |
| 18 // First value is test case name, second one is test name. | 18 // First value is test case name, second one is test name. |
| 19 typedef std::pair<std::string, std::string> SplitTestName; | 19 typedef std::pair<std::string, std::string> SplitTestName; |
| 20 | 20 |
| 21 // Returns a vector of gtest-based tests compiled into | 21 // Returns a vector of gtest-based tests compiled into |
| 22 // current executable. | 22 // current executable. |
| 23 std::vector<SplitTestName> GetCompiledInTests(); | 23 std::vector<SplitTestName> GetCompiledInTests(); |
| 24 | 24 |
| 25 // Writes the list of gtest-based tests compiled into | 25 // Writes the list of gtest-based tests compiled into |
| 26 // current executable as a JSON file. Returns true on success. | 26 // current executable as a JSON file. Returns true on success. |
| 27 bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT; | 27 bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT; |
| 28 | 28 |
| 29 // Reads the list of gtest-based tests from |path| into |output|. |
| 30 // Returns true on success. |
| 31 bool ReadTestNamesFromFile( |
| 32 const FilePath& path, |
| 33 std::vector<SplitTestName>* output) WARN_UNUSED_RESULT; |
| 34 |
| 29 } // namespace base | 35 } // namespace base |
| 30 | 36 |
| 31 #endif // BASE_TEST_GTEST_UTIL_H_ | 37 #endif // BASE_TEST_GTEST_UTIL_H_ |
| OLD | NEW |