google / google/googletest

Documentation/Implementation mismatch on behavior of TearDownEnvironment

Open
#3,840 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

Here us the documentation:
https://google.github.io/googletest/advanced.html#global-set-up-and-tear-down
It says:
RUN_ALL_TESTS() always calls TearDown() with each environment object, regardless of whether or not the tests were run.

However the code is different:
https://github.com/google/googletest/blob/5126f7166109666a9c0534021fb1a3038659494c/googletest/src/gtest.cc#L5847-L5903

Contributor guide

Open the contributing guide

Research direction

Compare the behavior described in the advanced.html global setup and teardown section with the TearDownEnvironment logic in googletest/src/gtest.cc at the referenced lines. Confirm the behavior when tests are not run, then align the documentation or implementation with the intended contract and verify the resulting behavior with the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.