Skip to content

Commit

Permalink
Works passing shared ptr to LimtiedBombLauncher
Browse files Browse the repository at this point in the history
  • Loading branch information
kn65op committed Feb 1, 2018
1 parent fbb8ee2 commit 6839dfb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game/LimitedBombLauncher.ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ struct LimitedBombLauncherTest : public ::testing::Test
const bool bomb_cannot_be_spawned = false;
const int max_bombs = 2;

std::shared_ptr<Mock<GameWorld>> game_world = std::make_shared<Mock<GameWorld>>();
std::shared_ptr<GameWorld> gw = game_world;
Mock<GameWorld> game_world;
std::shared_ptr<GameWorld> gw =
std::shared_ptr<GameWorld>(&game_world.get(), [](...) {});
LimitedBombLauncher launcher = LimitedBombLauncher{gw, max_bombs};
};

Expand Down

0 comments on commit 6839dfb

Please sign in to comment.