Skip to content

Commit

Permalink
removed source location from mock calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Laguna1989 committed Jul 7, 2024
1 parent f24d730 commit d7e5dd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
13 changes: 0 additions & 13 deletions test/unit/jt_test/common/audio/sound_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ TEST_F(SoundTestWithLoadedSound, SetVolumeOne)
EXPECT_FLOAT_EQ(m_sound->getVolume(), newVolume);
}

TEST_F(SoundTestWithLoadedSound, StopDoesNothingWhenNotPlaying)
{
m_sound->stop();
EXPECT_FALSE(m_sound->isPlaying());
}

TEST_F(SoundTestWithLoadedSound, StopPlayingSound)
{
m_sound->play();
m_sound->stop();
EXPECT_FALSE(m_sound->isPlaying());
}

TEST_F(SoundTestWithLoadedSound, PlayTwice)
{
m_sound->play();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TEST(LoggingBox2DContactManagerTest, ConstructorWithNullptrThrowsException)
TEST(LoggingBox2DContactManagerTest, ConstructorWithNullptrLogsFatal)
{
MockLogger logger;
EXPECT_CALL(logger, fatal(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, fatal(::testing::_, ::testing::_));
auto const func = [&logger]() { jt::LoggingBox2DContactManager { nullptr, logger }; };
ASSERT_THROW(func(), std::invalid_argument);
}
Expand All @@ -34,7 +34,7 @@ TEST(LoggingBox2DContactManagerTest, ConstructorLogsInfo)
{
MockLogger logger;
auto decoratee = std::make_shared<MockBox2DContactManager>();
EXPECT_CALL(logger, info(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, info(::testing::_, ::testing::_));
jt::LoggingBox2DContactManager { decoratee, logger };
}

Expand All @@ -44,7 +44,7 @@ TEST(LoggingBox2DContactManagerTest, SizeLogsVerbose)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, size());
EXPECT_CALL(logger, verbose(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, verbose(::testing::_, ::testing::_));
contactManager.size();
}

Expand All @@ -54,7 +54,7 @@ TEST(LoggingBox2DContactManagerTest, RegisterCallbackLogsInfo)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, registerCallback("abcd", ::testing::_));
EXPECT_CALL(logger, info(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, info(::testing::_, ::testing::_));
contactManager.registerCallback("abcd", nullptr);
}

Expand All @@ -64,7 +64,7 @@ TEST(LoggingBox2DContactManagerTest, UnregisterCallbackLogsInfo)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, unregisterCallback(::testing::_));
EXPECT_CALL(logger, info(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, info(::testing::_, ::testing::_));
contactManager.unregisterCallback("abcd");
}

Expand All @@ -74,7 +74,7 @@ TEST(LoggingBox2DContactManagerTest, GetAllCallbackIdentifiersLogsVerbose)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, getAllCallbackIdentifiers());
EXPECT_CALL(logger, verbose(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, verbose(::testing::_, ::testing::_));
contactManager.getAllCallbackIdentifiers();
}

Expand All @@ -84,7 +84,7 @@ TEST(LoggingBox2DContactManagerTest, BeginContactLogsDebug)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, BeginContact(::testing::_));
EXPECT_CALL(logger, debug(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, debug(::testing::_, ::testing::_));
contactManager.BeginContact(nullptr);
}

Expand All @@ -94,6 +94,6 @@ TEST(LoggingBox2DContactManagerTest, EndContactLogsDebug)
auto decoratee = std::make_shared<MockBox2DContactManager>();
auto contactManager = jt::LoggingBox2DContactManager { decoratee, logger };
EXPECT_CALL(*decoratee, EndContact(::testing::_));
EXPECT_CALL(logger, debug(::testing::_, ::testing::_, ::testing::_));
EXPECT_CALL(logger, debug(::testing::_, ::testing::_));
contactManager.EndContact(nullptr);
}

0 comments on commit d7e5dd9

Please sign in to comment.