aboutsummaryrefslogtreecommitdiff
path: root/src/test/AudioTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/AudioTest.cpp')
-rw-r--r--src/test/AudioTest.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/test/AudioTest.cpp b/src/test/AudioTest.cpp
index 415a12e..e548221 100644
--- a/src/test/AudioTest.cpp
+++ b/src/test/AudioTest.cpp
@@ -31,11 +31,11 @@ private:
private:
Mediator mediator;
- ComponentManager component_manager{mediator};
- ResourceManager resource_manager{mediator};
+ ComponentManager component_manager {mediator};
+ ResourceManager resource_manager {mediator};
public:
- TestAudioSystem system{mediator};
+ TestAudioSystem system {mediator};
TestSoundContext & context = system.context;
private:
@@ -60,6 +60,8 @@ TEST_F(AudioTest, Play) {
InSequence seq;
EXPECT_CALL(context, play(_)).Times(0);
+ EXPECT_CALL(context, set_loop(_, _)).Times(0);
+ EXPECT_CALL(context, set_volume(_, _)).Times(0);
component.play();
}
@@ -67,6 +69,8 @@ TEST_F(AudioTest, Play) {
InSequence seq;
EXPECT_CALL(context, play(_)).Times(1);
+ EXPECT_CALL(context, set_loop(_, _)).Times(1);
+ EXPECT_CALL(context, set_volume(_, _)).Times(1);
system.fixed_update();
}
}
@@ -146,6 +150,9 @@ TEST_F(AudioTest, PlayOnActive) {
InSequence seq;
EXPECT_CALL(context, play(_)).Times(1);
+ EXPECT_CALL(context, set_loop(_, _)).Times(1);
+ EXPECT_CALL(context, set_volume(_, _)).Times(1);
+
component.active = true;
system.fixed_update();
}
@@ -156,6 +163,8 @@ TEST_F(AudioTest, PlayImmediately) {
component.play();
EXPECT_CALL(context, play(_)).Times(1);
+ EXPECT_CALL(context, set_volume(_, _)).Times(1);
+ EXPECT_CALL(context, set_loop(_, _)).Times(1);
system.fixed_update();
}