diff options
author | Abseil Team <absl-team@google.com> | 2024-01-09 17:38:37 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-01-09 17:39:16 (GMT) |
commit | 7f409cb3c04694cdf867a04f11121eab35a67597 (patch) | |
tree | 27034d14bfa33118e55c86d59c7e11cc8010b6b7 | |
parent | 3b26f7e53bbe287deb57c75c796f17c9a82229a1 (diff) | |
download | googletest-7f409cb3c04694cdf867a04f11121eab35a67597.zip googletest-7f409cb3c04694cdf867a04f11121eab35a67597.tar.gz googletest-7f409cb3c04694cdf867a04f11121eab35a67597.tar.bz2 |
Add a note about argv requiring NULL termination.
Fixes: #4434
PiperOrigin-RevId: 596960654
Change-Id: I1f70cc0801764fe0328030c46254f82eb9893a49
-rw-r--r-- | docs/reference/testing.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/reference/testing.md b/docs/reference/testing.md index ead66b3..81640fd 100644 --- a/docs/reference/testing.md +++ b/docs/reference/testing.md @@ -1317,7 +1317,9 @@ tests. Initializes GoogleTest. This must be called before calling [`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 -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. |