0
0
mirror of https://github.com/google/googletest.git synced 2025-03-12 11:01:01 +00:00

18 Commits

Author SHA1 Message Date
Copybara-Service
987e225614 Merge pull request #4333 from ngie-eign:gtest_help_test-fix-FreeBSD
PiperOrigin-RevId: 557197748
Change-Id: I55b86353f5351bbcbdf8e6bca70e82d7383a5080
2023-08-15 11:39:35 -07:00
Dino Radakovic
dd9a956904 gtest_help_test: Make method names snake_case, conforming with [the style guide](https://google.github.io/styleguide/pyguide#316-naming)
PiperOrigin-RevId: 557133618
Change-Id: I27202ee91ee81b3d2e4c28102190d2bde8efba05
2023-08-15 08:00:31 -07:00
Dino Radakovic
6513d0272d gtest_help_test: Inline test helper functions
`TestNonHelpFlag` is only a few asserts with no logic, which is easier to read in line, and helper `TestHelpFlag` is used in a single test case.

PiperOrigin-RevId: 557122793
Change-Id: I7367424abfbb883c10c260fae066a2071e5dfa0e
2023-08-15 07:11:58 -07:00
Dino Radakovic
d76e9e0dd9 gtest_help_test: Delete obsolete helper TestUnknownFlagWithAbseil
PiperOrigin-RevId: 557116814
Change-Id: I91e06b0d6001952366c50201b67491475a1f98af
2023-08-15 06:42:46 -07:00
Enji Cooper
22eb2de1ef Fix GTestHelpTest.TestHelpFlag on FreeBSD
The test supported a variety of BSDs, including kFreeBSD, but not FreeBSD.

Move the BSD checks to a separate function and support checking for
FreeBSD, in addition to kFreeBSD.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
2023-08-07 20:18:01 -07:00
Abseil Team
dea0484e4d 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
2023-04-26 07:13:51 -07:00
Abseil Team
7f6f9c12ad Support --gtest_stream_result_to on macOS
This seems to just have been an oversight. POSIX socket APIs work just
fine on macOS.

Fixes https://github.com/google/googletest/issues/4214.

PiperOrigin-RevId: 523398386
Change-Id: I9d56cd9c6933318c1f0b0024f7fef44122fd0c83
2023-04-11 07:41:50 -07:00
Tom Hughes
0194f90d0e Fix Python docstrings to match style guide
https://google.github.io/styleguide/pyguide.html#s3.8.3-functions-and-methods

PiperOrigin-RevId: 504857416
Change-Id: I7815ce27e454a120b3974ae7e2bea952108b836c
2023-01-26 09:04:40 -08:00
Tom Hughes
d1ad27e0a4 Fix formatting in subset of Python files
These files were formatted with automated tools. The remaining Python
files require some manual fix ups, so they will be fixed separately.

PiperOrigin-RevId: 504579820
Change-Id: I3923bd414bffe3ded6163ec496cd09ace3951928
2023-01-25 09:14:26 -08:00
Derek Mauro
25dcdc7e8b Use the Abseil flags library when Abseil is present
When built with `--define=absl=1` under Bazel, GoogleTest
flags use ABSL_FLAG instead of GoogleTest's own implementation.

There are some minor behavior differences in this mode.

The most notable difference is that unrecognized flags result
in a flag parsing error, and are not returned to the user though
a modified argc/argv, unless they appear after the positional
argument delimiter ("--").

For example, to pass a non-Abseil flag, you would have to do
./mytest --gtest_color=false -- --myflag=myvalue

The documentation at https://abseil.io/docs/cpp/guides/flags
may be helpful in understanding the behavior.

There are some other minor differences. For example,
passing --help results in the program returning 1 instead of 0.

https://github.com/google/googletest/issues/3646

PiperOrigin-RevId: 439312700
Change-Id: Id696a25f50f24a5b1785c45ca8fa59794f86fd5c
2022-04-04 07:39:03 -07:00
Andrew Krasavin
631f4f9947 Fix gtest-help-test failure on OpenBSD 2022-02-05 03:44:54 +03:00
Derek Mauro
c58f562fa2 Makes the Python imports consistently use full paths from the repository root,
unifying the behavior between Bazel and CMake

This fixes one of the CI failures on Windows

PiperOrigin-RevId: 417872531
Change-Id: I156989323b7e6d4a4420f4f9691b078829db933d
2021-12-22 13:01:24 -08:00
Mattias Ellert
05e9fa23f7 Port to GNU/Hurd 2020-12-30 13:50:04 +01:00
Mattias Ellert
ed1bf86846 Fix gtest-help-test failure on GNU/kFreeBSD 2020-12-25 14:58:19 +01:00
Calum Robinson
fb19f57880 Add GTEST_BRIEF option
Only prints failures and a total pass count
2020-03-19 20:33:58 +00:00
Gennadiy Civil
265efde9a5 Comments changes, no functionality changes. 2018-08-14 15:04:11 -04:00
Gennadiy Civil
28c91e2cea Formatting changes 2018-05-23 11:03:31 -04:00
Billy Donahue
1f87a0970d Move everything in googletest into googletest/googletest 2015-08-25 16:18:00 -04:00