restore backwards compatibility with the API before download_priority_t was introduced
This commit is contained in:
parent
a690e6c76d
commit
7730eea401
|
@ -78,7 +78,7 @@ namespace
|
|||
std::vector<download_priority_t> prio;
|
||||
{
|
||||
allow_threading_guard guard;
|
||||
prio = handle.piece_priorities();
|
||||
prio = handle.get_piece_priorities();
|
||||
}
|
||||
|
||||
for (auto const p : prio)
|
||||
|
@ -170,7 +170,7 @@ void prioritize_files(torrent_handle& info, object o)
|
|||
list file_priorities(torrent_handle& handle)
|
||||
{
|
||||
list ret;
|
||||
std::vector<download_priority_t> priorities = handle.file_priorities();
|
||||
std::vector<download_priority_t> priorities = handle.get_file_priorities();
|
||||
|
||||
for (auto const p : priorities)
|
||||
ret.append(p);
|
||||
|
@ -516,9 +516,9 @@ void bind_torrent_handle()
|
|||
.def("piece_priority", _(piece_priority0))
|
||||
.def("piece_priority", _(piece_priority1))
|
||||
.def("prioritize_pieces", &prioritize_pieces)
|
||||
.def("piece_priorities", &piece_priorities)
|
||||
.def("get_piece_priorities", &piece_priorities)
|
||||
.def("prioritize_files", &prioritize_files)
|
||||
.def("file_priorities", &file_priorities)
|
||||
.def("get_file_priorities", &file_priorities)
|
||||
.def("file_priority", &file_prioritity0)
|
||||
.def("file_priority", &file_prioritity1)
|
||||
.def("file_status", _(file_status0))
|
||||
|
@ -551,6 +551,8 @@ void bind_torrent_handle()
|
|||
.def("unset_flags", _(&torrent_handle::unset_flags))
|
||||
// deprecated
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
.def("piece_priorities", &piece_priorities)
|
||||
.def("file_priorities", &file_priorities)
|
||||
.def("stop_when_ready", _(&torrent_handle::stop_when_ready))
|
||||
.def("super_seeding", super_seeding1)
|
||||
.def("auto_managed", _(&torrent_handle::auto_managed))
|
||||
|
|
|
@ -64,18 +64,18 @@ class test_torrent_handle(unittest.TestCase):
|
|||
|
||||
def test_torrent_handle(self):
|
||||
self.setup()
|
||||
self.assertEqual(self.h.file_priorities(), [4, 4])
|
||||
self.assertEqual(self.h.piece_priorities(), [4])
|
||||
self.assertEqual(self.h.get_file_priorities(), [4, 4])
|
||||
self.assertEqual(self.h.get_piece_priorities(), [4])
|
||||
|
||||
self.h.prioritize_files([0, 1])
|
||||
self.assertEqual(self.h.file_priorities(), [0, 1])
|
||||
self.assertEqual(self.h.get_file_priorities(), [0, 1])
|
||||
|
||||
self.h.prioritize_pieces([0])
|
||||
self.assertEqual(self.h.piece_priorities(), [0])
|
||||
self.assertEqual(self.h.get_piece_priorities(), [0])
|
||||
|
||||
# also test the overload that takes a list of piece->priority mappings
|
||||
self.h.prioritize_pieces([(0, 1)])
|
||||
self.assertEqual(self.h.piece_priorities(), [1])
|
||||
self.assertEqual(self.h.get_piece_priorities(), [1])
|
||||
|
||||
print(self.h.queue_position())
|
||||
|
||||
|
@ -256,12 +256,12 @@ class test_torrent_handle(unittest.TestCase):
|
|||
self.assertEqual(len(trackers), 1)
|
||||
self.assertEqual(trackers[0].get('url'), 'http://test.com/announce')
|
||||
self.assertEqual(trackers[0].get('tier'), 0)
|
||||
self.assertEqual(self.h.file_priorities(), [1,1])
|
||||
self.assertEqual(self.h.get_file_priorities(), [1,1])
|
||||
self.assertEqual(self.h.http_seeds(),['http://test.com/file3'])
|
||||
# url_seeds was already set, test that it did not got overwritten
|
||||
self.assertEqual(self.h.url_seeds(),
|
||||
['http://test.com/announce-url/', 'http://test.com/file/'])
|
||||
self.assertEqual(self.h.piece_priorities(),[4])
|
||||
self.assertEqual(self.h.get_piece_priorities(),[4])
|
||||
self.assertEqual(self.ti.merkle_tree(),[])
|
||||
self.assertEqual(self.st.verified_pieces,[])
|
||||
|
||||
|
|
|
@ -1797,7 +1797,7 @@ COLUMN OPTIONS
|
|||
std::vector<std::int64_t> file_progress;
|
||||
h.file_progress(file_progress);
|
||||
std::vector<lt::open_file_state> file_status = h.file_status();
|
||||
std::vector<lt::download_priority_t> file_prio = h.file_priorities();
|
||||
std::vector<lt::download_priority_t> file_prio = h.get_file_priorities();
|
||||
auto f = file_status.begin();
|
||||
std::shared_ptr<const lt::torrent_info> ti = h.torrent_file();
|
||||
|
||||
|
|
|
@ -991,19 +991,21 @@ namespace aux {
|
|||
// Invalid entries, where the piece index or priority is out of range, are
|
||||
// not allowed.
|
||||
//
|
||||
// ``piece_priorities`` returns a vector with one element for each piece
|
||||
// ``get_piece_priorities`` returns a vector with one element for each piece
|
||||
// in the torrent. Each element is the current priority of that piece.
|
||||
void piece_priority(piece_index_t index, download_priority_t priority) const;
|
||||
download_priority_t piece_priority(piece_index_t index) const;
|
||||
void prioritize_pieces(std::vector<download_priority_t> const& pieces) const;
|
||||
void prioritize_pieces(std::vector<std::pair<piece_index_t, download_priority_t>> const& pieces) const;
|
||||
std::vector<download_priority_t> piece_priorities() const;
|
||||
std::vector<download_priority_t> get_piece_priorities() const;
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
TORRENT_DEPRECATED
|
||||
void prioritize_pieces(std::vector<int> const& pieces) const;
|
||||
TORRENT_DEPRECATED
|
||||
void prioritize_pieces(std::vector<std::pair<piece_index_t, int>> const& pieces) const;
|
||||
TORRENT_DEPRECATED
|
||||
std::vector<int> piece_priorities() const;
|
||||
#endif
|
||||
|
||||
// ``index`` must be in the range [0, number_of_files).
|
||||
|
@ -1015,7 +1017,7 @@ namespace aux {
|
|||
// file. The function sets the priorities of all the pieces in the
|
||||
// torrent based on the vector.
|
||||
//
|
||||
// ``file_priorities()`` returns a vector with the priorities of all
|
||||
// ``get_file_priorities()`` returns a vector with the priorities of all
|
||||
// files.
|
||||
//
|
||||
// The priority values are the same as for piece_priority().
|
||||
|
@ -1031,11 +1033,13 @@ namespace aux {
|
|||
void file_priority(file_index_t index, download_priority_t priority) const;
|
||||
download_priority_t file_priority(file_index_t index) const;
|
||||
void prioritize_files(std::vector<download_priority_t> const& files) const;
|
||||
std::vector<download_priority_t> file_priorities() const;
|
||||
std::vector<download_priority_t> get_file_priorities() const;
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
TORRENT_DEPRECATED
|
||||
void prioritize_files(std::vector<int> const& files) const;
|
||||
TORRENT_DEPRECATED
|
||||
std::vector<int> file_priorities() const;
|
||||
#endif
|
||||
|
||||
// ``force_reannounce()`` will force this torrent to do another tracker
|
||||
|
|
|
@ -483,7 +483,7 @@ namespace libtorrent {
|
|||
async_call(&torrent::prioritize_piece_list, pieces);
|
||||
}
|
||||
|
||||
std::vector<download_priority_t> torrent_handle::piece_priorities() const
|
||||
std::vector<download_priority_t> torrent_handle::get_piece_priorities() const
|
||||
{
|
||||
aux::vector<download_priority_t, piece_index_t> ret;
|
||||
auto retp = &ret;
|
||||
|
@ -508,6 +508,18 @@ namespace libtorrent {
|
|||
p.reserve(pieces.size());
|
||||
async_call(&torrent::prioritize_piece_list, std::move(p));
|
||||
}
|
||||
|
||||
std::vector<int> torrent_handle::piece_priorities() const
|
||||
{
|
||||
aux::vector<download_priority_t, piece_index_t> prio;
|
||||
auto retp = &prio;
|
||||
sync_call(&torrent::piece_priorities, retp);
|
||||
std::vector<int> ret;
|
||||
ret.reserve(prio.size());
|
||||
for (auto p : prio)
|
||||
ret.push_back(int(static_cast<std::uint8_t>(p)));
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
void torrent_handle::file_priority(file_index_t index, download_priority_t priority) const
|
||||
|
@ -526,7 +538,7 @@ namespace libtorrent {
|
|||
, static_cast<aux::vector<download_priority_t, file_index_t> const&>(files));
|
||||
}
|
||||
|
||||
std::vector<download_priority_t> torrent_handle::file_priorities() const
|
||||
std::vector<download_priority_t> torrent_handle::get_file_priorities() const
|
||||
{
|
||||
aux::vector<download_priority_t, file_index_t> ret;
|
||||
auto retp = &ret;
|
||||
|
@ -548,6 +560,19 @@ namespace libtorrent {
|
|||
async_call(&torrent::prioritize_files, file_prio);
|
||||
}
|
||||
|
||||
std::vector<int> torrent_handle::file_priorities() const
|
||||
{
|
||||
aux::vector<download_priority_t, file_index_t> prio;
|
||||
auto retp = &prio;
|
||||
sync_call(&torrent::file_priorities, retp);
|
||||
std::vector<int> ret;
|
||||
ret.reserve(prio.size());
|
||||
for (auto p : prio)
|
||||
ret.push_back(int(static_cast<std::uint8_t>(p)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int torrent_handle::get_peer_upload_limit(tcp::endpoint) const { return -1; }
|
||||
int torrent_handle::get_peer_download_limit(tcp::endpoint) const { return -1; }
|
||||
void torrent_handle::set_peer_upload_limit(tcp::endpoint, int /* limit */) const {}
|
||||
|
|
|
@ -185,7 +185,7 @@ void test_transfer(settings_pack const& sett, bool test_deprecated = false)
|
|||
std::cout << "torrent is finished (50% complete)" << std::endl;
|
||||
else return;
|
||||
|
||||
std::vector<download_priority_t> priorities2 = tor2.piece_priorities();
|
||||
std::vector<download_priority_t> priorities2 = tor2.get_piece_priorities();
|
||||
std::copy(priorities2.begin(), priorities2.end()
|
||||
, std::ostream_iterator<download_priority_t>(std::cout, ", "));
|
||||
std::cout << std::endl;
|
||||
|
@ -194,7 +194,7 @@ void test_transfer(settings_pack const& sett, bool test_deprecated = false)
|
|||
std::cout << "force recheck" << std::endl;
|
||||
tor2.force_recheck();
|
||||
|
||||
priorities2 = tor2.piece_priorities();
|
||||
priorities2 = tor2.get_piece_priorities();
|
||||
std::copy(priorities2.begin(), priorities2.end()
|
||||
, std::ostream_iterator<download_priority_t>(std::cout, ", "));
|
||||
std::cout << std::endl;
|
||||
|
@ -227,7 +227,7 @@ void test_transfer(settings_pack const& sett, bool test_deprecated = false)
|
|||
|
||||
std::cout << "recheck complete" << std::endl;
|
||||
|
||||
priorities2 = tor2.piece_priorities();
|
||||
priorities2 = tor2.get_piece_priorities();
|
||||
std::copy(priorities2.begin(), priorities2.end(), std::ostream_iterator<download_priority_t>(std::cout, ", "));
|
||||
std::cout << std::endl;
|
||||
TEST_CHECK(std::equal(priorities.begin(), priorities.end(), priorities2.begin()));
|
||||
|
|
|
@ -418,7 +418,7 @@ TORRENT_TEST(file_priorities_default_deprecated)
|
|||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses
|
||||
, {}, "", "", true).file_priorities();
|
||||
, {}, "", "", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 4);
|
||||
|
@ -431,7 +431,7 @@ TORRENT_TEST(file_priorities_default_deprecated)
|
|||
TORRENT_TEST(file_priorities_in_resume_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1);
|
||||
|
@ -444,7 +444,7 @@ TORRENT_TEST(file_priorities_in_resume_deprecated)
|
|||
TORRENT_TEST(file_priorities_in_resume_and_params_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "456", "123").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "456", "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 4);
|
||||
|
@ -457,7 +457,7 @@ TORRENT_TEST(file_priorities_override_resume_deprecated)
|
|||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses
|
||||
, add_torrent_params::flag_override_resume_data, "", "123").file_priorities();
|
||||
, add_torrent_params::flag_override_resume_data, "", "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1);
|
||||
|
@ -470,7 +470,7 @@ TORRENT_TEST(file_priorities_resume_seed_mode_deprecated)
|
|||
// in share mode file priorities should always be 0
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses,
|
||||
torrent_flags::share_mode, "", "123", true).file_priorities();
|
||||
torrent_flags::share_mode, "", "123", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0);
|
||||
|
@ -483,7 +483,7 @@ TORRENT_TEST(file_priorities_seed_mode_deprecated)
|
|||
// in share mode file priorities should always be 0
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses,
|
||||
torrent_flags::share_mode, "123", "", true).file_priorities();
|
||||
torrent_flags::share_mode, "123", "", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0);
|
||||
|
@ -542,7 +542,7 @@ TORRENT_TEST(file_priorities_resume_override_deprecated)
|
|||
// flag is set.
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses,
|
||||
torrent_flags::override_resume_data, "", "123", true).file_priorities();
|
||||
torrent_flags::override_resume_data, "", "123", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1);
|
||||
|
@ -553,7 +553,7 @@ TORRENT_TEST(file_priorities_resume_override_deprecated)
|
|||
TORRENT_TEST(file_priorities_resume_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123", true).file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1);
|
||||
|
@ -564,7 +564,7 @@ TORRENT_TEST(file_priorities_resume_deprecated)
|
|||
TORRENT_TEST(file_priorities1_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "010", "", true).file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "010", "", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0);
|
||||
|
@ -577,7 +577,7 @@ TORRENT_TEST(file_priorities1_deprecated)
|
|||
TORRENT_TEST(file_priorities2_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "123", "", true).file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "123", "", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1);
|
||||
|
@ -588,7 +588,7 @@ TORRENT_TEST(file_priorities2_deprecated)
|
|||
TORRENT_TEST(file_priorities3_deprecated)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "4321", "", true).file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "4321", "", true).get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 4);
|
||||
|
@ -779,7 +779,7 @@ TORRENT_TEST(file_priorities_default)
|
|||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities
|
||||
= test_resume_flags(ses, {}, "", "").file_priorities();
|
||||
= test_resume_flags(ses, {}, "", "").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 4_pri);
|
||||
|
@ -792,7 +792,7 @@ TORRENT_TEST(file_priorities_resume_seed_mode)
|
|||
// in share mode file priorities should always be 0
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses
|
||||
, torrent_flags::share_mode, "", "123").file_priorities();
|
||||
, torrent_flags::share_mode, "", "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0_pri);
|
||||
|
@ -805,7 +805,7 @@ TORRENT_TEST(file_priorities_seed_mode)
|
|||
// in share mode file priorities should always be 0
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses
|
||||
, torrent_flags::share_mode, "123", "").file_priorities();
|
||||
, torrent_flags::share_mode, "123", "").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0_pri);
|
||||
|
@ -1103,7 +1103,7 @@ TORRENT_TEST(resume_save_load_resume)
|
|||
TORRENT_TEST(file_priorities_resume)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "", "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1_pri);
|
||||
|
@ -1114,7 +1114,7 @@ TORRENT_TEST(file_priorities_resume)
|
|||
TORRENT_TEST(file_priorities1)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "010").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "010").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 0_pri);
|
||||
|
@ -1127,7 +1127,7 @@ TORRENT_TEST(file_priorities1)
|
|||
TORRENT_TEST(file_priorities2)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "123").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "123").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 1_pri);
|
||||
|
@ -1138,7 +1138,7 @@ TORRENT_TEST(file_priorities2)
|
|||
TORRENT_TEST(file_priorities3)
|
||||
{
|
||||
lt::session ses(settings());
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "4321").file_priorities();
|
||||
std::vector<download_priority_t> file_priorities = test_resume_flags(ses, {}, "4321").get_file_priorities();
|
||||
|
||||
TEST_EQUAL(file_priorities.size(), 3);
|
||||
TEST_EQUAL(file_priorities[0], 4_pri);
|
||||
|
|
|
@ -94,14 +94,14 @@ void test_running_torrent(std::shared_ptr<torrent_info> info, std::int64_t file_
|
|||
|
||||
TEST_EQUAL(st.total_wanted, 0); // we don't want anything
|
||||
TEST_EQUAL(st.total_wanted_done, 0);
|
||||
TEST_EQUAL(int(h.file_priorities().size()), info->num_files());
|
||||
TEST_EQUAL(int(h.get_file_priorities().size()), info->num_files());
|
||||
if (!st.is_seeding)
|
||||
{
|
||||
TEST_EQUAL(h.file_priorities()[0], 0_pri);
|
||||
TEST_EQUAL(h.get_file_priorities()[0], 0_pri);
|
||||
if (info->num_files() > 1)
|
||||
TEST_EQUAL(h.file_priorities()[1], 1_pri);
|
||||
TEST_EQUAL(h.get_file_priorities()[1], 1_pri);
|
||||
if (info->num_files() > 2)
|
||||
TEST_EQUAL(h.file_priorities()[2], 1_pri);
|
||||
TEST_EQUAL(h.get_file_priorities()[2], 1_pri);
|
||||
}
|
||||
|
||||
if (info->num_files() > 1)
|
||||
|
@ -114,12 +114,12 @@ void test_running_torrent(std::shared_ptr<torrent_info> info, std::int64_t file_
|
|||
TEST_EQUAL(st.total_wanted_done, 0);
|
||||
if (!st.is_seeding)
|
||||
{
|
||||
TEST_EQUAL(int(h.file_priorities().size()), info->num_files());
|
||||
TEST_EQUAL(h.file_priorities()[0], 0_pri);
|
||||
TEST_EQUAL(int(h.get_file_priorities().size()), info->num_files());
|
||||
TEST_EQUAL(h.get_file_priorities()[0], 0_pri);
|
||||
if (info->num_files() > 1)
|
||||
TEST_EQUAL(h.file_priorities()[1], 0_pri);
|
||||
TEST_EQUAL(h.get_file_priorities()[1], 0_pri);
|
||||
if (info->num_files() > 2)
|
||||
TEST_EQUAL(h.file_priorities()[2], 1_pri);
|
||||
TEST_EQUAL(h.get_file_priorities()[2], 1_pri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue