Lines Matching full:fixture
197 ## Can I derive a test fixture from another?
201 Each test fixture has a corresponding and same named test suite. This means only
202 one test suite can use a particular fixture. Sometimes, however, multiple test
207 In GoogleTest, you share a fixture among test suites by putting the shared logic
208 in a base test fixture, then deriving from that base a separate fixture for each
210 tests using each derived fixture.
215 // Defines a base test fixture.
221 // Derives a fixture FooTest from BaseTest.
225 BaseTest::SetUp(); // Sets up the base fixture first.
231 BaseTest::TearDown(); // Remember to tear down the base fixture
238 // Tests that use the fixture FooTest.
245 If necessary, you can continue to derive test fixtures from a derived fixture.
285 ## Should I use the constructor/destructor of the test fixture or SetUp()/TearDown()? {#CtorVsSetUp}
288 fixture object across multiple tests. For each `TEST_F`, GoogleTest will create
289 a **fresh** test fixture object, immediately call `SetUp()`, run the test body,
290 call `TearDown()`, and then delete the test fixture object.
293 between using the test fixture constructor/destructor or `SetUp()`/`TearDown()`.
299 * In case we need to subclass the test fixture class, the subclass'
392 …ave several test suites which share the same test fixture logic; do I have to define a new test fi…
500 ## I have a fixture class `FooTest`, but `TEST_F(FooTest, Bar)` gives me error ``"no matching funct…
502 GoogleTest needs to be able to create objects of your test fixture class, so it
635 The rule is **all test methods in the same test suite must use the same fixture
637 same fixture class (`::testing::Test`).
654 from GoogleTest because the test methods are using different test fixture
659 class CoolTest : public ::testing::Test {}; // Fixture foo::CoolTest
666 class CoolTest : public ::testing::Test {}; // Fixture: bar::CoolTest