| 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 #include "base/test/gtest_util.h" | 5 #include "base/test/gtest_util.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 | 13 |
| 14 std::string FormatFullTestName(const std::string& test_case_name, |
| 15 const std::string& test_name) { |
| 16 return test_case_name + "." + test_name; |
| 17 } |
| 18 |
| 14 std::vector<SplitTestName> GetCompiledInTests() { | 19 std::vector<SplitTestName> GetCompiledInTests() { |
| 15 testing::UnitTest* const unit_test = testing::UnitTest::GetInstance(); | 20 testing::UnitTest* const unit_test = testing::UnitTest::GetInstance(); |
| 16 | 21 |
| 17 std::vector<SplitTestName> tests; | 22 std::vector<SplitTestName> tests; |
| 18 for (int i = 0; i < unit_test->total_test_case_count(); ++i) { | 23 for (int i = 0; i < unit_test->total_test_case_count(); ++i) { |
| 19 const testing::TestCase* test_case = unit_test->GetTestCase(i); | 24 const testing::TestCase* test_case = unit_test->GetTestCase(i); |
| 20 for (int j = 0; j < test_case->total_test_count(); ++j) { | 25 for (int j = 0; j < test_case->total_test_count(); ++j) { |
| 21 const testing::TestInfo* test_info = test_case->GetTestInfo(j); | 26 const testing::TestInfo* test_info = test_case->GetTestInfo(j); |
| 22 tests.push_back(std::make_pair(test_case->name(), test_info->name())); | 27 tests.push_back(std::make_pair(test_case->name(), test_info->name())); |
| 23 } | 28 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return false; | 74 return false; |
| 70 | 75 |
| 71 result.push_back(std::make_pair(test_case_name, test_name)); | 76 result.push_back(std::make_pair(test_case_name, test_name)); |
| 72 } | 77 } |
| 73 | 78 |
| 74 output->swap(result); | 79 output->swap(result); |
| 75 return true; | 80 return true; |
| 76 } | 81 } |
| 77 | 82 |
| 78 } // namespace | 83 } // namespace |
| OLD | NEW |