Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in_death_test_child_process: undeclared identifier #4164

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

sergio-nsk
Copy link
Contributor

The error occurs if !GTEST_HAS_DEATH_TEST on Windows.

I could not make the change better. If I make

bool in_death_test_child_process = false;
#if GTEST_HAS_DEATH_TEST
  in_death_test_child_process =
      GTEST_FLAG_GET(internal_run_death_test).length() > 0;

then the error about an assigned but unused variable occurs on Linux.

The error occurs if !GTEST_HAS_DEATH_TEST on Windows.
@horenmar
Copy link

I think the fix in #4165 (implemented for microsoft/vcpkg#29772) is better.

@sergio-nsk
Copy link
Contributor Author

@horenmar The fix with #if GTEST_OS_WINDOWS && GTEST_HAS_DEATH_TEST completely excludes the code block that tunes output to stderr not only for death tests. IMHO it's not correct.

@kolumnin

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants