aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-08 14:47:31 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-08 14:47:31 +0100
commitbff2e7d64d45d8e331da703cba0d74894cf32a84 (patch)
treec799409b5ad210114d359d78271305a8f18a93d5
parent8ea70b897805ff84113758d45a4c5c1a171a77bd (diff)
fix audio unit test
-rw-r--r--src/test/AudioTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/AudioTest.cpp b/src/test/AudioTest.cpp
index 3844c73..e548221 100644
--- a/src/test/AudioTest.cpp
+++ b/src/test/AudioTest.cpp
@@ -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();
}