From aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 26 Jun 2020 10:14:39 -0400 Subject: [PATCH] Googletest export Add Bazel build rules for gtest_list_output_unittest.py and correct some off-by-one line number expectations. PiperOrigin-RevId: 318466071 --- googletest/test/gtest_list_output_unittest.py | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/googletest/test/gtest_list_output_unittest.py b/googletest/test/gtest_list_output_unittest.py index 396c04c5..b882126e 100644 --- a/googletest/test/gtest_list_output_unittest.py +++ b/googletest/test/gtest_list_output_unittest.py @@ -56,20 +56,20 @@ EXPECTED_XML = """<\?xml version="1.0" encoding="UTF-8"\?> - - + + - - + + - - + + - - + + @@ -124,13 +124,13 @@ EXPECTED_JSON = """{ "name": "Test7", "type_param": "int", "file": ".*gtest_list_output_unittest_.cc", - "line": 60 + "line": 61 }, { "name": "Test8", "type_param": "int", "file": ".*gtest_list_output_unittest_.cc", - "line": 61 + "line": 62 } \] }, @@ -142,13 +142,13 @@ EXPECTED_JSON = """{ "name": "Test7", "type_param": "bool", "file": ".*gtest_list_output_unittest_.cc", - "line": 60 + "line": 61 }, { "name": "Test8", "type_param": "bool", "file": ".*gtest_list_output_unittest_.cc", - "line": 61 + "line": 62 } \] }, @@ -160,13 +160,13 @@ EXPECTED_JSON = """{ "name": "Test9", "type_param": "int", "file": ".*gtest_list_output_unittest_.cc", - "line": 68 + "line": 69 }, { "name": "Test10", "type_param": "int", "file": ".*gtest_list_output_unittest_.cc", - "line": 69 + "line": 70 } \] }, @@ -178,13 +178,13 @@ EXPECTED_JSON = """{ "name": "Test9", "type_param": "bool", "file": ".*gtest_list_output_unittest_.cc", - "line": 68 + "line": 69 }, { "name": "Test10", "type_param": "bool", "file": ".*gtest_list_output_unittest_.cc", - "line": 69 + "line": 70 } \] }, @@ -260,6 +260,7 @@ class GTestListTestsOutputUnitTest(gtest_test_utils.TestCase): self.assertTrue(p.exited) self.assertEqual(0, p.exit_code) + self.assertTrue(os.path.isfile(file_path)) with open(file_path) as f: result = f.read() return result