| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -713,7 +713,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() { | |||
| 713 | 713 | const char* const gtest_output_flag = s.c_str(); | |
| 714 | 714 | ||
| 715 | 715 | std::string format = GetOutputFormat(); | |
| 716 | - if (format.empty()) format = std::string(kDefaultOutputFormat); | ||
| 716 | + if (format.empty()) format = kDefaultOutputFormat; | ||
| 717 | 717 | ||
| 718 | 718 | const char* const colon = strchr(gtest_output_flag, ':'); | |
| 719 | 719 | if (colon == nullptr) | |
@@ -3305,6 +3305,7 @@ bool ShouldUseColor(bool stdout_is_tty) { | |||
| 3305 | 3305 | const bool term_supports_color = | |
| 3306 | 3306 | term != nullptr && (String::CStringEquals(term, "xterm") || | |
| 3307 | 3307 | String::CStringEquals(term, "xterm-color") || | |
| 3308 | + String::CStringEquals(term, "xterm-ghostty") || | ||
| 3308 | 3309 | String::CStringEquals(term, "xterm-kitty") || | |
| 3309 | 3310 | String::CStringEquals(term, "alacritty") || | |
| 3310 | 3311 | String::CStringEquals(term, "screen") || | |
@@ -4354,8 +4355,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream, | |||
| 4354 | 4355 | internal::FormatCompilerIndependentFileLocation(part.file_name(), | |
| 4355 | 4356 | part.line_number()); | |
| 4356 | 4357 | const std::string summary = location + "\n" + part.summary(); | |
| 4357 | - *stream << " <skipped message=\"" | ||
| 4358 | - << EscapeXmlAttribute(summary.c_str()) << "\">"; | ||
| 4358 | + *stream << " <skipped message=\"" << EscapeXmlAttribute(summary) | ||
| 4359 | + << "\">"; | ||
| 4359 | 4360 | const std::string detail = location + "\n" + part.message(); | |
| 4360 | 4361 | OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str()); | |
| 4361 | 4362 | *stream << "</skipped>\n"; | |
@@ -6091,7 +6092,11 @@ bool UnitTestImpl::RunAllTests() { | |||
| 6091 | 6092 | constexpr char kNoTestsSelectedMessage[] = | |
| 6092 | 6093 | "No tests were selected to run. Please make sure at least one test " | |
| 6093 | 6094 | "exists and is not disabled! If the test is sharded, you may have " | |
| 6094 | - "defined more shards than test cases, which is wasteful."; | ||
| 6095 | + "defined more shards than test cases, which is wasteful. If you also " | ||
| 6096 | + "defined --gtest_filter, that filter is taken into account, so " | ||
| 6097 | + "shards with no matching test cases will hit this error. Either " | ||
| 6098 | + "disable sharding, set --gtest_fail_if_no_test_selected=false, or " | ||
| 6099 | + "remove the filter to resolve this error."; | ||
| 6095 | 6100 | ColoredPrintf(GTestColor::kRed, "%s\n", kNoTestsSelectedMessage); | |
| 6096 | 6101 | return false; | |
| 6097 | 6102 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments