Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: base/test/gtest_util.h

Issue 2439423003: test launcher: make --gtest_filter=A.B + --gtest_also_run_disabled_tests also run A.DISABLED_B or D… (Closed)
Patch Set: Just rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/test/gtest_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 std::string test_name; 71 std::string test_name;
72 std::string file; 72 std::string file;
73 int line; 73 int line;
74 }; 74 };
75 75
76 // Constructs a full test name given a test case name and a test name, 76 // Constructs a full test name given a test case name and a test name,
77 // e.g. for test case "A" and test name "B" returns "A.B". 77 // e.g. for test case "A" and test name "B" returns "A.B".
78 std::string FormatFullTestName(const std::string& test_case_name, 78 std::string FormatFullTestName(const std::string& test_case_name,
79 const std::string& test_name); 79 const std::string& test_name);
80 80
81 // Returns the full test name with the "DISABLED_" prefix stripped out.
82 // e.g. for the full test names "A.DISABLED_B", "DISABLED_A.B", and
83 // "DISABLED_A.DISABLED_B", returns "A.B".
84 std::string TestNameWithoutDisabledPrefix(const std::string& full_test_name);
85
81 // Returns a vector of gtest-based tests compiled into 86 // Returns a vector of gtest-based tests compiled into
82 // current executable. 87 // current executable.
83 std::vector<TestIdentifier> GetCompiledInTests(); 88 std::vector<TestIdentifier> GetCompiledInTests();
84 89
85 // Writes the list of gtest-based tests compiled into 90 // Writes the list of gtest-based tests compiled into
86 // current executable as a JSON file. Returns true on success. 91 // current executable as a JSON file. Returns true on success.
87 bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT; 92 bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT;
88 93
89 // Reads the list of gtest-based tests from |path| into |output|. 94 // Reads the list of gtest-based tests from |path| into |output|.
90 // Returns true on success. 95 // Returns true on success.
91 bool ReadTestNamesFromFile( 96 bool ReadTestNamesFromFile(
92 const FilePath& path, 97 const FilePath& path,
93 std::vector<TestIdentifier>* output) WARN_UNUSED_RESULT; 98 std::vector<TestIdentifier>* output) WARN_UNUSED_RESULT;
94 99
95 } // namespace base 100 } // namespace base
96 101
97 #endif // BASE_TEST_GTEST_UTIL_H_ 102 #endif // BASE_TEST_GTEST_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/gtest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698