summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-02-13 09:57:09 +0000
committerCarl Hetherington <cth@carlh.net>2019-02-13 09:57:09 +0000
commitaf7fe636291ee7f75f86b19d55713a595b24636c (patch)
treeaceb8ea94b620ea2ae3284d03aee6deb61219b9d
parentf1b5f778c2a4d9ec29e5d61b896908c0669f07f9 (diff)
Fix test after Shuffler changes.
-rw-r--r--src/lib/shuffler.h4
-rw-r--r--test/shuffler_test.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/shuffler.h b/src/lib/shuffler.h
index 7ac300b47..80754a5e0 100644
--- a/src/lib/shuffler.h
+++ b/src/lib/shuffler.h
@@ -22,6 +22,8 @@
#include "content_video.h"
#include <boost/signals2.hpp>
+struct shuffler_test5;
+
class Piece;
class Shuffler
@@ -36,6 +38,8 @@ public:
typedef std::pair<boost::weak_ptr<Piece>, ContentVideo> Store;
private:
+ friend struct ::shuffler_test5;
+
std::list<Store> _store;
boost::optional<ContentVideo> _last;
static int const _max_size;
diff --git a/test/shuffler_test.cc b/test/shuffler_test.cc
index a8b45930f..6d90ba27d 100644
--- a/test/shuffler_test.cc
+++ b/test/shuffler_test.cc
@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE (shuffler_test5)
check (0, EYES_LEFT, __LINE__);
/* More lefts should be kept in the shuffler in the hope that some rights arrive */
- for (int i = 0; i < 8; ++i) {
+ for (int i = 0; i < s._max_size; ++i) {
push (s, i + 1, EYES_LEFT);
}
BOOST_CHECK (pending_cv.empty ());
@@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE (shuffler_test5)
/* If enough lefts come the shuffler should conclude that there's no rights and start
giving out the lefts.
*/
- push (s, 9, EYES_LEFT);
+ push (s, s._max_size + 1, EYES_LEFT);
check (1, EYES_LEFT, __LINE__);
}