1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 12:28:31 +01:00

Fix unit tests

This commit is contained in:
David Sansome 2011-11-27 15:29:48 +00:00
parent b8ee548eb4
commit dc49c098df

View File

@ -207,7 +207,11 @@ TEST_F(Mpris1Test, GetsStatus) {
status = mpris_->player()->GetStatus(); status = mpris_->player()->GetStatus();
EXPECT_EQ(0, status.random); EXPECT_EQ(0, status.random);
sequence_->SetShuffleMode(PlaylistSequence::Shuffle_Album); sequence_->SetShuffleMode(PlaylistSequence::Shuffle_InsideAlbum);
status = mpris_->player()->GetStatus();
EXPECT_EQ(1, status.random);
sequence_->SetShuffleMode(PlaylistSequence::Shuffle_Albums);
status = mpris_->player()->GetStatus(); status = mpris_->player()->GetStatus();
EXPECT_EQ(1, status.random); EXPECT_EQ(1, status.random);
@ -233,7 +237,12 @@ TEST_F(Mpris1Test, HandlesShuffleModeChanged) {
sequence_->SetShuffleMode(PlaylistSequence::Shuffle_All); sequence_->SetShuffleMode(PlaylistSequence::Shuffle_All);
ASSERT_EQ(0, spy.count()); ASSERT_EQ(0, spy.count());
sequence_->SetShuffleMode(PlaylistSequence::Shuffle_Album); sequence_->SetShuffleMode(PlaylistSequence::Shuffle_InsideAlbum);
ASSERT_EQ(1, spy.count());
EXPECT_EQ(1, spy[0][0].value<DBusStatus>().random);
spy.clear();
sequence_->SetShuffleMode(PlaylistSequence::Shuffle_Albums);
ASSERT_EQ(1, spy.count()); ASSERT_EQ(1, spy.count());
EXPECT_EQ(1, spy[0][0].value<DBusStatus>().random); EXPECT_EQ(1, spy[0][0].value<DBusStatus>().random);
spy.clear(); spy.clear();