| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BASE_TEST_GTEST_UTIL_H_ | |
| 6 #define BASE_TEST_GTEST_UTIL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <utility> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/compiler_specific.h" | |
| 13 | |
| 14 namespace base { | |
| 15 | |
| 16 class FilePath; | |
| 17 | |
| 18 // First value is test case name, second one is test name. | |
| 19 typedef std::pair<std::string, std::string> SplitTestName; | |
| 20 | |
| 21 // Constructs a full test name given a test case name and a test name, | |
| 22 // e.g. for test case "A" and test name "B" returns "A.B". | |
| 23 std::string FormatFullTestName(const std::string& test_case_name, | |
| 24 const std::string& test_name); | |
| 25 | |
| 26 // Returns a vector of gtest-based tests compiled into | |
| 27 // current executable. | |
| 28 std::vector<SplitTestName> GetCompiledInTests(); | |
| 29 | |
| 30 // Writes the list of gtest-based tests compiled into | |
| 31 // current executable as a JSON file. Returns true on success. | |
| 32 bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT; | |
| 33 | |
| 34 // Reads the list of gtest-based tests from |path| into |output|. | |
| 35 // Returns true on success. | |
| 36 bool ReadTestNamesFromFile( | |
| 37 const FilePath& path, | |
| 38 std::vector<SplitTestName>* output) WARN_UNUSED_RESULT; | |
| 39 | |
| 40 } // namespace base | |
| 41 | |
| 42 #endif // BASE_TEST_GTEST_UTIL_H_ | |
| OLD | NEW |