@@ -104,6 +104,28 @@ TEST_F(SoundTest, SetEffect)
104104
105105 EXPECT_CALL (*m_player, setPitch (8 ));
106106 sound.setEffect (Sound::Effect::Pitch, 400 );
107+
108+ // Pan
109+ EXPECT_CALL (*m_player, setPan (-1 ));
110+ sound.setEffect (Sound::Effect::Pan, -150 );
111+
112+ EXPECT_CALL (*m_player, setPan (-1 ));
113+ sound.setEffect (Sound::Effect::Pan, -100 );
114+
115+ EXPECT_CALL (*m_player, setPan (-0.5 ));
116+ sound.setEffect (Sound::Effect::Pan, -50 );
117+
118+ EXPECT_CALL (*m_player, setPan (0 ));
119+ sound.setEffect (Sound::Effect::Pan, 0 );
120+
121+ EXPECT_CALL (*m_player, setPan (0.5 ));
122+ sound.setEffect (Sound::Effect::Pan, 50 );
123+
124+ EXPECT_CALL (*m_player, setPan (1 ));
125+ sound.setEffect (Sound::Effect::Pan, 100 );
126+
127+ EXPECT_CALL (*m_player, setPan (1 ));
128+ sound.setEffect (Sound::Effect::Pan, 150 );
107129}
108130
109131TEST_F (SoundTest, Start)
@@ -166,6 +188,8 @@ TEST_F(SoundTest, Clone)
166188 EXPECT_CALL (*clonePlayer, setVolume (0.45 ));
167189 EXPECT_CALL (*m_player, pitch ()).WillOnce (Return (1.25 ));
168190 EXPECT_CALL (*clonePlayer, setPitch (1.25 ));
191+ EXPECT_CALL (*m_player, pan ()).WillOnce (Return (-0.75 ));
192+ EXPECT_CALL (*clonePlayer, setPan (-0.75 ));
169193 EXPECT_CALL (*clonePlayer, isLoaded ()).WillOnce (Return (true ));
170194 auto clone = sound->clone ();
171195 ASSERT_TRUE (clone);
@@ -183,6 +207,8 @@ TEST_F(SoundTest, Clone)
183207 EXPECT_CALL (*cloneClonePlayer, setVolume (0.62 ));
184208 EXPECT_CALL (*clonePlayer, pitch ()).WillOnce (Return (0.5 ));
185209 EXPECT_CALL (*cloneClonePlayer, setPitch (0.5 ));
210+ EXPECT_CALL (*clonePlayer, pan ()).WillOnce (Return (0.25 ));
211+ EXPECT_CALL (*cloneClonePlayer, setPan (0.25 ));
186212 EXPECT_CALL (*cloneClonePlayer, isLoaded ()).WillOnce (Return (true ));
187213 auto cloneClone = clone->clone ();
188214 ASSERT_TRUE (cloneClone);
@@ -195,6 +221,8 @@ TEST_F(SoundTest, Clone)
195221 EXPECT_CALL (*anotherClonePlayer, setVolume (0.62 ));
196222 EXPECT_CALL (*clonePlayer, pitch ()).WillOnce (Return (2 ));
197223 EXPECT_CALL (*anotherClonePlayer, setPitch (2 ));
224+ EXPECT_CALL (*clonePlayer, pan ()).WillOnce (Return (1 ));
225+ EXPECT_CALL (*anotherClonePlayer, setPan (1 ));
198226 EXPECT_CALL (*anotherClonePlayer, isLoaded ()).Times (0 );
199227 auto anotherClone = clone->clone ();
200228 ASSERT_TRUE (anotherClone);
0 commit comments