From dc49c098dfd5f6c49f98b3b7cb2e129a261dacdb Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 27 Nov 2011 15:29:48 +0000 Subject: [PATCH] Fix unit tests --- tests/mpris1_test.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/mpris1_test.cpp b/tests/mpris1_test.cpp index 595790cac..d88631b8d 100644 --- a/tests/mpris1_test.cpp +++ b/tests/mpris1_test.cpp @@ -207,7 +207,11 @@ TEST_F(Mpris1Test, GetsStatus) { status = mpris_->player()->GetStatus(); 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(); EXPECT_EQ(1, status.random); @@ -233,7 +237,12 @@ TEST_F(Mpris1Test, HandlesShuffleModeChanged) { sequence_->SetShuffleMode(PlaylistSequence::Shuffle_All); 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().random); + spy.clear(); + + sequence_->SetShuffleMode(PlaylistSequence::Shuffle_Albums); ASSERT_EQ(1, spy.count()); EXPECT_EQ(1, spy[0][0].value().random); spy.clear();