add test of paused session
This commit is contained in:
parent
8fac4e7d5c
commit
3988a443ff
|
@ -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
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
template <typename Set, typename Save, typename Default, typename Load>
|
template <typename Set, typename Save, typename Default, typename Load>
|
||||||
|
|
Loading…
Reference in New Issue