summaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_help_test.py
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2023-04-26 14:13:23 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-04-26 14:13:51 (GMT)
commitdea0484e4d3b6a2c50055c24c5617cd662a50c5f (patch)
tree1bdef22b8d4eb567b4685f97b6113818ba1b8947 /googletest/test/gtest_help_test.py
parentccdeec888ebb740a7ea4e07d3e84a1b7ee32b315 (diff)
downloadgoogletest-dea0484e4d3b6a2c50055c24c5617cd662a50c5f.zip
googletest-dea0484e4d3b6a2c50055c24c5617cd662a50c5f.tar.gz
googletest-dea0484e4d3b6a2c50055c24c5617cd662a50c5f.tar.bz2
Use Abseil Flag public API for flag parsing.
This change brings InitGoogleTest semantic in accordance with the official documentation: only GoogleTest flags are removed from argc/argv. The rest of the flags remains in place. We do nothing special for flags with unrecognized gunit_/gtest_ prefix and we do not report them. PiperOrigin-RevId: 527257221 Change-Id: Ibb29a1bda1a44251a4ee579c0fb5bbdfd9965c21
Diffstat (limited to 'googletest/test/gtest_help_test.py')
-rwxr-xr-xgoogletest/test/gtest_help_test.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/googletest/test/gtest_help_test.py b/googletest/test/gtest_help_test.py
index 9261b87..85a0c33 100755
--- a/googletest/test/gtest_help_test.py
+++ b/googletest/test/gtest_help_test.py
@@ -54,7 +54,6 @@ PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_help_test_')
FLAG_PREFIX = '--gtest_'
DEATH_TEST_STYLE_FLAG = FLAG_PREFIX + 'death_test_style'
STREAM_RESULT_TO_FLAG = FLAG_PREFIX + 'stream_result_to'
-UNKNOWN_GTEST_PREFIXED_FLAG = FLAG_PREFIX + 'unknown_flag_for_testing'
LIST_TESTS_FLAG = FLAG_PREFIX + 'list_tests'
INTERNAL_FLAG_FOR_TESTING = FLAG_PREFIX + 'internal_flag_for_testing'
@@ -177,16 +176,6 @@ class GTestHelpTest(gtest_test_utils.TestCase):
def testPrintsHelpWithFullFlag(self):
self.TestHelpFlag('--help')
- def testPrintsHelpWithUnrecognizedGoogleTestFlag(self):
- # The behavior is slightly different when Abseil flags is
- # used. Abseil flags rejects all unknown flags, while the builtin
- # GTest flags implementation interprets an unknown flag with a
- # '--gtest_' prefix as a request for help.
- if HAS_ABSL_FLAGS:
- self.TestUnknownFlagWithAbseil(UNKNOWN_GTEST_PREFIXED_FLAG)
- else:
- self.TestHelpFlag(UNKNOWN_GTEST_PREFIXED_FLAG)
-
def testRunsTestsWithoutHelpFlag(self):
"""Verifies correct behavior when no help flag is specified.