For each test defined with TEST_F(), Google Test will:
- Create a fresh test fixture at runtime
- Immediately initialize it via SetUp() ,
- Run the test
- Clean up by calling TearDown()
- Delete the test fixture. Note that different tests in the same test case have different test fixture objects, and Google Test always deletes a test fixture before it creates the next one. Google Test does not reuse the same test fixture for multiple tests. Any changes one test makes to the fixture do not affect other tests.
it means you can assume in SetUp that your test fixture class instance is freshly constructed. You don't need to undo anything in SetUp. Similarly, the test fixture class members will be destroyed between tests. In most cases there is no need to use scoped_ptrs and manually manage things in SetUp and TearDown.
sorry, could you clarify on scoped_ptrs?
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev