Add a note about argv requiring NULL termination.

Fixes: #4434
PiperOrigin-RevId: 596960654
Change-Id: I1f70cc0801764fe0328030c46254f82eb9893a49
This commit is contained in:
Abseil Team 2024-01-09 09:38:37 -08:00 committed by Copybara-Service
parent 3b26f7e53b
commit 7f409cb3c0

View File

@ -1317,7 +1317,9 @@ tests.
Initializes GoogleTest. This must be called before calling Initializes GoogleTest. This must be called before calling
[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS). In particular, it parses the command line [`RUN_ALL_TESTS()`](#RUN_ALL_TESTS). In particular, it parses the command line
for the flags that GoogleTest recognizes. Whenever a GoogleTest flag is seen, it for the flags that GoogleTest recognizes. Whenever a GoogleTest flag is seen, it
is removed from `argv`, and `*argc` is decremented. is removed from `argv`, and `*argc` is decremented. Keep in mind that `argv`
must terminate with a `NULL` pointer (i.e. `argv[argc]` is `NULL`), which is
already the case with the default `argv` passed to `main`.
No value is returned. Instead, the GoogleTest flag variables are updated. No value is returned. Instead, the GoogleTest flag variables are updated.