add test of paused session

This commit is contained in:
arvidn 2016-05-22 02:20:49 -04:00
parent 8fac4e7d5c
commit 3988a443ff
1 changed files with 19 additions and 0 deletions

View File

@ -125,6 +125,25 @@ TORRENT_TEST(session_stats)
}
}
TORRENT_TEST(paused_session)
{
lt::session s;
s.pause();
lt::add_torrent_params ps;
ps.info_hash.assign("abababababababababab");
ps.flags = lt::add_torrent_params::flag_paused;
ps.save_path = ".";
torrent_handle h = s.add_torrent(ps);
test_sleep(2000);
h.resume();
test_sleep(1000);
TEST_CHECK(!h.is_paused());
}
#if __cplusplus >= 201103L
template <typename Set, typename Save, typename Default, typename Load>