sync: move CancellationToken tests (#2477)

In preparation of work on `CancellationToken` internals, the tests are
moved into `tests/` and are updated to not depend on internals.
This commit is contained in:
Carl Lerche
2020-05-03 12:35:47 -07:00
committed by GitHub
parent 187af2e6a3
commit 264ae3bdb2
9 changed files with 294 additions and 363 deletions
+3
View File
@@ -259,3 +259,6 @@ async_assert_fn!(tokio::time::timeout_at(Instant, BoxFutureSync<()>): Send & Syn
async_assert_fn!(tokio::time::timeout_at(Instant, BoxFutureSend<()>): Send & !Sync);
async_assert_fn!(tokio::time::timeout_at(Instant, BoxFuture<()>): !Send & !Sync);
async_assert_fn!(tokio::time::Interval::tick(_): Send & Sync);
#[cfg(tokio_unstable)]
assert_value!(tokio::sync::CancellationToken: Send & Sync);