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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 418093004: Factored out duplicate code for formatting full test name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« base/test/launcher/test_launcher.h ('K') | « base/test/launcher/test_launcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 5d9a95f6fda517bc73ae4c9031df3666af5c57b7..78d438c826f622c899b74c9b4e92a4557f10719f 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -578,6 +578,11 @@ void TestLauncher::OnTestFinished(const TestResult& result) {
test_started_count_ += retry_started_count;
}
+std::string TestLauncher::FormatFullTestName(const std::string& test_case_name,
sky 2014/07/31 15:57:22 Add // static on previous line (see style guide).
Sergiy Byelozyorov 2014/07/31 17:33:03 Done.
+ const std::string& test_name) {
+ return test_case_name + "." + test_name;
+}
+
bool TestLauncher::Init() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
@@ -787,9 +792,8 @@ void TestLauncher::RunTests() {
const testing::TestCase* test_case = unit_test->GetTestCase(i);
for (int j = 0; j < test_case->total_test_count(); ++j) {
const testing::TestInfo* test_info = test_case->GetTestInfo(j);
- std::string test_name = test_info->test_case_name();
- test_name.append(".");
- test_name.append(test_info->name());
+ std::string test_name = FormatFullTestName(
+ test_info->test_case_name(), test_name.append(test_info->name()));
results_tracker_.AddTest(test_name);
« base/test/launcher/test_launcher.h ('K') | « base/test/launcher/test_launcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698