Skip to content

Commit

Permalink
Simplified the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Gray committed May 15, 2015
1 parent fbc43b8 commit b00e1a3
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/autowiring/test/ContextCreatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,11 @@ TEST_F(ContextCreatorTest, VoidKeyType) {

struct mySigil {};

class BackReferencingClass:
class Runnable:
public CoreRunnable
{
public:
bool OnStart(void) override {
AutoCurrentContext ctxt;
m_parentContext = ctxt->GetParentContext();
return true;
}
void OnStop(bool graceful) {
m_parentContext.reset();
}
std::shared_ptr<CoreContext> m_parentContext;
bool OnStart(void) override { return true; }
};

TEST_F(ContextCreatorTest, TeardownListenerTest) {
Expand All @@ -226,7 +218,7 @@ TEST_F(ContextCreatorTest, TeardownListenerTest) {
AutoRequired<ContextCreator<mySigil, int>> creator;
{
auto subctxt = creator->CreateContext(0).first;
auto brc = subctxt->Inject<BackReferencingClass>();
auto brc = subctxt->Inject<Runnable>();
subctxt->Initiate();
}
creator->Clear(true);
Expand Down

0 comments on commit b00e1a3

Please sign in to comment.