@@ -713,7 +713,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile(){
713713const char * const gtest_output_flag = s.c_str ();
714714
715715 std::string format = GetOutputFormat ();
716- if (format.empty ()) format = std::string ( kDefaultOutputFormat ) ;
716+ if (format.empty ()) format = kDefaultOutputFormat ;
717717
718718const char * const colon = strchr (gtest_output_flag, ' :' );
719719if (colon == nullptr )
@@ -3305,6 +3305,7 @@ bool ShouldUseColor(bool stdout_is_tty){
33053305const bool term_supports_color =
33063306 term != nullptr && (String::CStringEquals (term, " xterm" ) ||
33073307String::CStringEquals (term, " xterm-color" ) ||
3308+ String::CStringEquals (term, " xterm-ghostty" ) ||
33083309String::CStringEquals (term, " xterm-kitty" ) ||
33093310String::CStringEquals (term, " alacritty" ) ||
33103311String::CStringEquals (term, " screen" ) ||
@@ -4354,8 +4355,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream,
43544355internal::FormatCompilerIndependentFileLocation (part.file_name (),
43554356 part.line_number ());
43564357const std::string summary = location + " \n " + part.summary ();
4357- *stream << " <skipped message=\" "
4358- << EscapeXmlAttribute (summary. c_str ()) << " \" >" ;
4358+ *stream << " <skipped message=\" " << EscapeXmlAttribute (summary)
4359+ << " \" >" ;
43594360const std::string detail = location + " \n " + part.message ();
43604361OutputXmlCDataSection (stream, RemoveInvalidXmlCharacters (detail).c_str ());
43614362 *stream << " </skipped>\n " ;
@@ -6091,7 +6092,11 @@ bool UnitTestImpl::RunAllTests(){
60916092constexpr char kNoTestsSelectedMessage [] =
60926093" No tests were selected to run. Please make sure at least one test "
60936094" 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." ;
60956100ColoredPrintf (GTestColor::kRed , " %s\n " , kNoTestsSelectedMessage );
60966101return false ;
60976102 }
0 commit comments