From 7cbc577e94ed048f2a8146fab6972ae6ff290be7 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 10 Dec 2024 18:57:03 +0100 Subject: fix AudioSystem bug + add regression test --- src/test/AudioTest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/test/AudioTest.cpp') diff --git a/src/test/AudioTest.cpp b/src/test/AudioTest.cpp index 774fdb8..48bba1b 100644 --- a/src/test/AudioTest.cpp +++ b/src/test/AudioTest.cpp @@ -150,3 +150,12 @@ TEST_F(AudioTest, PlayOnActive) { system.update(); } } + +TEST_F(AudioTest, PlayImmediately) { + component.play_on_awake = false; + component.play(); + + EXPECT_CALL(context, play(_)).Times(1); + + system.update(); +} -- cgit v1.2.3