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

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: Fixed bug Created 6 years, 4 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
« no previous file with comments | « 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 56ed4a27024bd95cfcd87a237a46fe54c9d9be0b..ca60cbacea0da7ea79ffbe31f0844b902d2be630 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -576,6 +576,12 @@ void TestLauncher::OnTestFinished(const TestResult& result) {
test_started_count_ += retry_started_count;
}
+// static
+std::string TestLauncher::FormatFullTestName(const std::string& test_case_name,
+ const std::string& test_name) {
+ return test_case_name + "." + test_name;
+}
+
bool TestLauncher::Init() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
@@ -785,9 +791,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_info->name());
results_tracker_.AddTest(test_name);
« no previous file with comments | « base/test/launcher/test_launcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698