From da1f7fe1e7a54f2ecc6451b08053a29f735b4327 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 16:06:32 -0500 Subject: [PATCH 01/10] Code merging --- googletest/include/gtest/gtest.h | 11 ++++++++++- googletest/include/gtest/gtest_pred_impl.h | 13 ++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 57201123..940e5769 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -349,6 +349,15 @@ GTEST_API_ AssertionResult AssertionFailure(); // Deprecated; use AssertionFailure() << msg. GTEST_API_ AssertionResult AssertionFailure(const Message& msg); +} // namespace testing + +// Includes the auto-generated header that implements a family of generic +// predicate assertion macros. This include comes late because it relies on +// APIs declared above. +#include "gtest/gtest_pred_impl.h" + +namespace testing { + // The abstract class that all tests inherit from. // // In Google Test, a unit test program contains one or many TestCases, and @@ -359,7 +368,7 @@ GTEST_API_ AssertionResult AssertionFailure(const Message& msg); // this for you. // // The only time you derive from Test is when defining a test fixture -// to be used a TEST_F. For example: +// to be used in a TEST_F. For example: // // class FooTest : public testing::Test { // protected: diff --git a/googletest/include/gtest/gtest_pred_impl.h b/googletest/include/gtest/gtest_pred_impl.h index 30ae712f..c8be230e 100644 --- a/googletest/include/gtest/gtest_pred_impl.h +++ b/googletest/include/gtest/gtest_pred_impl.h @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// This file is AUTOMATICALLY GENERATED on 10/31/2011 by command +// This file is AUTOMATICALLY GENERATED on 01/02/2018 by command // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! // // Implements a family of generic predicate assertion macros. @@ -35,10 +35,9 @@ #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -# error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ +#include "gtest/gtest.h" + +namespace testing { // This header implements a family of generic predicate assertion // macros: @@ -66,8 +65,6 @@ // We also define the EXPECT_* variations. // // For now we only support predicates whose arity is at most 5. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. // GTEST_ASSERT_ is the basic statement to which all of the assertions // in this file reduce. Don't use this in your code. @@ -355,4 +352,6 @@ AssertionResult AssertPred5Helper(const char* pred_text, +} // namespace testing + #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ From d629744ec0e08d4e8b27ec18ec8e38ca52fea843 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 16:23:23 -0500 Subject: [PATCH 02/10] More code merges --- googletest/include/gtest/gtest.h | 33 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 940e5769..fe515bda 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -563,9 +563,8 @@ class GTEST_API_ TestResult { // Returns the elapsed time, in milliseconds. TimeInMillis elapsed_time() const { return elapsed_time_; } - // Returns the i-th test part result among all the results. i can range - // from 0 to test_property_count() - 1. If i is not in that range, aborts - // the program. + // Returns the i-th test part result among all the results. i can range from 0 + // to total_part_count() - 1. If i is not in that range, aborts the program. const TestPartResult& GetTestPartResult(int i) const; // Returns the i-th test property. i can range from 0 to @@ -688,6 +687,9 @@ class GTEST_API_ TestInfo { // Returns the line where this test is defined. int line() const { return location_.line; } + // Return true if this test should not be run because it's in another shard. + bool is_in_another_shard() const { return is_in_another_shard_; } + // Returns true if this test should run, that is if the test is not // disabled (or it is disabled but the also_run_disabled_tests flag has // been specified) and its full name matches the user-specified filter. @@ -708,10 +710,9 @@ class GTEST_API_ TestInfo { // Returns true iff this test will appear in the XML report. bool is_reportable() const { - // For now, the XML report includes all tests matching the filter. - // In the future, we may trim tests that are excluded because of - // sharding. - return matches_filter_; + // The XML report includes tests matching the filter, excluding those + // run in other shards. + return matches_filter_ && !is_in_another_shard_; } // Returns the result of the test. @@ -775,6 +776,7 @@ class GTEST_API_ TestInfo { bool is_disabled_; // True iff this test is disabled bool matches_filter_; // True if this test matches the // user-specified filter. + bool is_in_another_shard_; // Will be run in another shard. internal::TestFactoryBase* const factory_; // The factory that creates // the test object @@ -1791,7 +1793,6 @@ template class TestWithParam : public Test, public WithParamInterface { }; - // Macros for indicating success/failure in test code. // ADD_FAILURE unconditionally adds a failure to the current test. @@ -1864,22 +1865,18 @@ class TestWithParam : public Test, public WithParamInterface { // AssertionResult. For more information on how to use AssertionResult with // these macros see comments on that class. #define EXPECT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_((condition), #condition, false, true, \ + GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ GTEST_NONFATAL_FAILURE_) #define EXPECT_FALSE(condition) \ GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ GTEST_NONFATAL_FAILURE_) #define ASSERT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_((condition), #condition, false, true, \ + GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ GTEST_FATAL_FAILURE_) #define ASSERT_FALSE(condition) \ GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ GTEST_FATAL_FAILURE_) -// Includes the auto-generated header that implements a family of -// generic predicate assertion macros. -#include "gtest/gtest_pred_impl.h" - // Macros for testing equalities and inequalities. // // * {ASSERT|EXPECT}_EQ(v1, v2): Tests that v1 == v2 @@ -1921,8 +1918,8 @@ class TestWithParam : public Test, public WithParamInterface { // // Examples: // -// EXPECT_NE(5, Foo()); -// EXPECT_EQ(NULL, a_pointer); +// EXPECT_NE(Foo(), 5); +// EXPECT_EQ(a_pointer, NULL); // ASSERT_LT(i, array_size); // ASSERT_GT(records.size(), 0) << "There is no record left."; @@ -2221,8 +2218,8 @@ bool StaticAssertTypeEq() { // } // // TEST_F(FooTest, ReturnsElementCountCorrectly) { -// EXPECT_EQ(0, a_.size()); -// EXPECT_EQ(1, b_.size()); +// EXPECT_EQ(a_.size(), 0); +// EXPECT_EQ(b_.size(), 1); // } #define TEST_F(test_fixture, test_name)\ From 5f4ce9d88475b5f5b089c10983ea65cdc9cb92d8 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 16:46:16 -0500 Subject: [PATCH 03/10] Test files for corresponding changes --- googletest/test/gtest_xml_output_unittest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 9f92f982..9ba08dfb 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -141,6 +141,19 @@ EXPECTED_FILTERED_TEST_XML = """ """ +EXPECTED_SHARDED_TEST_XML = """ + + + + + + + + + + +""" + EXPECTED_EMPTY_XML = """ From f45c22c4824934299f2899d2717efbf3061cfe73 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 16:56:17 -0500 Subject: [PATCH 04/10] Test files for corresponding changes --- googletest/test/gtest_xml_output_unittest.py | 30 ++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 9ba08dfb..3b0abaea 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -46,11 +46,16 @@ import gtest_xml_test_utils GTEST_FILTER_FLAG = '--gtest_filter' GTEST_LIST_TESTS_FLAG = '--gtest_list_tests' -GTEST_OUTPUT_FLAG = "--gtest_output" -GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" -GTEST_PROGRAM_NAME = "gtest_xml_output_unittest_" +GTEST_OUTPUT_FLAG = '--gtest_output' +GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.xml' +GTEST_PROGRAM_NAME = 'gtest_xml_output_unittest_' -SUPPORTS_STACK_TRACES = False +# The environment variables for test sharding. +TOTAL_SHARDS_ENV_VAR = 'TEST_TOTAL_SHARDS' +SHARD_INDEX_ENV_VAR = 'TEST_SHARD_INDEX' +SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE' + +SUPPORTS_STACK_TRACES = IS_LINUX if SUPPORTS_STACK_TRACES: STACK_TRACE_TEMPLATE = '\nStack trace:\n*' @@ -276,7 +281,22 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_FILTERED_TEST_XML, 0, extra_args=['%s=SuccessfulTest.*' % GTEST_FILTER_FLAG]) - def _GetXmlOutput(self, gtest_prog_name, extra_args, expected_exit_code): + def testShardedTestXmlOutput(self): + """Verifies XML output when run using multiple shards. + + Runs a test program that executes only one shard and verifies that tests + from other shards do not show up in the XML output. + """ + + self._TestXmlOutput( + GTEST_PROGRAM_NAME, + EXPECTED_SHARDED_TEST_XML, + 0, + extra_env={SHARD_INDEX_ENV_VAR: '0', + TOTAL_SHARDS_ENV_VAR: '10'}) + + def _GetXmlOutput(self, gtest_prog_name, extra_args, extra_env, + expected_exit_code): """ Returns the xml output generated by running the program gtest_prog_name. Furthermore, the program's exit code must be expected_exit_code. From 6befe422f2ce9e2d8b702c1afb70325a6f2856e4 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 16:59:57 -0500 Subject: [PATCH 05/10] Test files for corresponding changes --- googletest/test/gtest_xml_output_unittest.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 3b0abaea..2057be7d 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -200,7 +200,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): Runs a test program that generates an empty XML output, and checks if the timestamp attribute in the testsuites tag is valid. """ - actual = self._GetXmlOutput('gtest_no_test_unittest', [], 0) + actual = self._GetXmlOutput('gtest_no_test_unittest', [], {}, 0) date_time_str = actual.documentElement.getAttributeNode('timestamp').value # datetime.strptime() is only available in Python 2.5+ so we have to # parse the expected datetime manually. @@ -230,8 +230,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): 'gtest_no_test_unittest') try: os.remove(output_file) - except OSError: - e = sys.exc_info()[1] + except OSError, e: if e.errno != errno.ENOENT: raise @@ -307,7 +306,11 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): command = ([gtest_prog_path, '%s=xml:%s' % (GTEST_OUTPUT_FLAG, xml_path)] + extra_args) - p = gtest_test_utils.Subprocess(command) + environ_copy = os.environ.copy() + if extra_env: + environ_copy.update(extra_env) + p = gtest_test_utils.Subprocess(command, env=environ_copy) + if p.terminated_by_signal: self.assert_(False, '%s was killed by signal %d' % (gtest_prog_name, p.signal)) @@ -321,7 +324,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): return actual def _TestXmlOutput(self, gtest_prog_name, expected_xml, - expected_exit_code, extra_args=None): + expected_exit_code, extra_args=None, extra_env=None): """ Asserts that the XML document generated by running the program gtest_prog_name matches expected_xml, a string containing another @@ -330,7 +333,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): """ actual = self._GetXmlOutput(gtest_prog_name, extra_args or [], - expected_exit_code) + extra_env or {}, expected_exit_code) expected = minidom.parseString(expected_xml) self.NormalizeXml(actual.documentElement) self.AssertEquivalentNodes(expected.documentElement, From 304be8f009d0b8be6e98fb136a77df6ee8bb129f Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 17:15:52 -0500 Subject: [PATCH 06/10] Test files for corresponding changes --- googletest/test/gtest_xml_output_unittest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 2057be7d..234c914f 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -40,6 +40,8 @@ import re import sys from xml.dom import minidom, Node +IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' + import gtest_test_utils import gtest_xml_test_utils From b9e297838daa46cbfc8cfef58fe4c4c3cc8c0d68 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 17:34:46 -0500 Subject: [PATCH 07/10] Reverting some changes, need to make the merge compile --- googletest/include/gtest/gtest.h | 5 +- googletest/test/gtest_xml_output_unittest.py | 60 ++++---------------- 2 files changed, 12 insertions(+), 53 deletions(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index fe515bda..3eeaf6fb 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -687,9 +687,6 @@ class GTEST_API_ TestInfo { // Returns the line where this test is defined. int line() const { return location_.line; } - // Return true if this test should not be run because it's in another shard. - bool is_in_another_shard() const { return is_in_another_shard_; } - // Returns true if this test should run, that is if the test is not // disabled (or it is disabled but the also_run_disabled_tests flag has // been specified) and its full name matches the user-specified filter. @@ -712,7 +709,7 @@ class GTEST_API_ TestInfo { bool is_reportable() const { // The XML report includes tests matching the filter, excluding those // run in other shards. - return matches_filter_ && !is_in_another_shard_; + return matches_filter_; } // Returns the result of the test. diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 234c914f..9f92f982 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -40,24 +40,17 @@ import re import sys from xml.dom import minidom, Node -IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' - import gtest_test_utils import gtest_xml_test_utils GTEST_FILTER_FLAG = '--gtest_filter' GTEST_LIST_TESTS_FLAG = '--gtest_list_tests' -GTEST_OUTPUT_FLAG = '--gtest_output' -GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.xml' -GTEST_PROGRAM_NAME = 'gtest_xml_output_unittest_' +GTEST_OUTPUT_FLAG = "--gtest_output" +GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" +GTEST_PROGRAM_NAME = "gtest_xml_output_unittest_" -# The environment variables for test sharding. -TOTAL_SHARDS_ENV_VAR = 'TEST_TOTAL_SHARDS' -SHARD_INDEX_ENV_VAR = 'TEST_SHARD_INDEX' -SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE' - -SUPPORTS_STACK_TRACES = IS_LINUX +SUPPORTS_STACK_TRACES = False if SUPPORTS_STACK_TRACES: STACK_TRACE_TEMPLATE = '\nStack trace:\n*' @@ -148,19 +141,6 @@ EXPECTED_FILTERED_TEST_XML = """ """ -EXPECTED_SHARDED_TEST_XML = """ - - - - - - - - - - -""" - EXPECTED_EMPTY_XML = """ @@ -202,7 +182,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): Runs a test program that generates an empty XML output, and checks if the timestamp attribute in the testsuites tag is valid. """ - actual = self._GetXmlOutput('gtest_no_test_unittest', [], {}, 0) + actual = self._GetXmlOutput('gtest_no_test_unittest', [], 0) date_time_str = actual.documentElement.getAttributeNode('timestamp').value # datetime.strptime() is only available in Python 2.5+ so we have to # parse the expected datetime manually. @@ -232,7 +212,8 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): 'gtest_no_test_unittest') try: os.remove(output_file) - except OSError, e: + except OSError: + e = sys.exc_info()[1] if e.errno != errno.ENOENT: raise @@ -282,22 +263,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_FILTERED_TEST_XML, 0, extra_args=['%s=SuccessfulTest.*' % GTEST_FILTER_FLAG]) - def testShardedTestXmlOutput(self): - """Verifies XML output when run using multiple shards. - - Runs a test program that executes only one shard and verifies that tests - from other shards do not show up in the XML output. - """ - - self._TestXmlOutput( - GTEST_PROGRAM_NAME, - EXPECTED_SHARDED_TEST_XML, - 0, - extra_env={SHARD_INDEX_ENV_VAR: '0', - TOTAL_SHARDS_ENV_VAR: '10'}) - - def _GetXmlOutput(self, gtest_prog_name, extra_args, extra_env, - expected_exit_code): + def _GetXmlOutput(self, gtest_prog_name, extra_args, expected_exit_code): """ Returns the xml output generated by running the program gtest_prog_name. Furthermore, the program's exit code must be expected_exit_code. @@ -308,11 +274,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): command = ([gtest_prog_path, '%s=xml:%s' % (GTEST_OUTPUT_FLAG, xml_path)] + extra_args) - environ_copy = os.environ.copy() - if extra_env: - environ_copy.update(extra_env) - p = gtest_test_utils.Subprocess(command, env=environ_copy) - + p = gtest_test_utils.Subprocess(command) if p.terminated_by_signal: self.assert_(False, '%s was killed by signal %d' % (gtest_prog_name, p.signal)) @@ -326,7 +288,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): return actual def _TestXmlOutput(self, gtest_prog_name, expected_xml, - expected_exit_code, extra_args=None, extra_env=None): + expected_exit_code, extra_args=None): """ Asserts that the XML document generated by running the program gtest_prog_name matches expected_xml, a string containing another @@ -335,7 +297,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): """ actual = self._GetXmlOutput(gtest_prog_name, extra_args or [], - extra_env or {}, expected_exit_code) + expected_exit_code) expected = minidom.parseString(expected_xml) self.NormalizeXml(actual.documentElement) self.AssertEquivalentNodes(expected.documentElement, From 6d04de7419a722e382c0445db88a7f749f6087d6 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 17:36:45 -0500 Subject: [PATCH 08/10] Reverting some changes, need to make the merge compile --- googletest/include/gtest/gtest.h | 1 - 1 file changed, 1 deletion(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 3eeaf6fb..8326fa5d 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -773,7 +773,6 @@ class GTEST_API_ TestInfo { bool is_disabled_; // True iff this test is disabled bool matches_filter_; // True if this test matches the // user-specified filter. - bool is_in_another_shard_; // Will be run in another shard. internal::TestFactoryBase* const factory_; // The factory that creates // the test object From 9195571c6952dc4c8b6059fc6c15157a1e50f623 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 17:39:33 -0500 Subject: [PATCH 09/10] Reverting some changes, need to make the merge compile --- googletest/include/gtest/gtest.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 8326fa5d..c6efae50 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -707,8 +707,9 @@ class GTEST_API_ TestInfo { // Returns true iff this test will appear in the XML report. bool is_reportable() const { - // The XML report includes tests matching the filter, excluding those - // run in other shards. + // The XML report includes tests matching the filter. + // In the future, we may trim tests that are excluded because of + - // sharding. return matches_filter_; } From 08b323f717eace078d3b2e3d9e29e1df5db6f293 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 15 Jan 2018 18:16:11 -0500 Subject: [PATCH 10/10] Reverting some changes, need to make the merge compile --- googletest/include/gtest/gtest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index c6efae50..c4444cf6 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -709,7 +709,7 @@ class GTEST_API_ TestInfo { bool is_reportable() const { // The XML report includes tests matching the filter. // In the future, we may trim tests that are excluded because of - - // sharding. + // sharding. return matches_filter_; }