Mir

Code review comment for lp:~robertcarr/mir/cleanup-session-manager-unit-test

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

34 + std::shared_ptr<msess::SessionManager> session_manager;

We could make this a normal object instead of a shared_ptr, by using the Test fixture constructor, instead of SetUp(), to initialize the fixture.

In general, I prefer using the constructor since it allows us to initialize members objects (like session_manager in this case) and also to have const members variables. Of course, there are a few cases when we need to use SetUp(), as mentioned in the linked FAQ below.

See https://code.google.com/p/googletest/wiki/V1_6_FAQ#Should_I_use_the_constructor/destructor_of_the_test_fixture_or_t

review: Needs Fixing

« Back to merge proposal