File: test.rs

package info (click to toggle)
rust-pollster-macro 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: makefile: 4
file content (27 lines) | stat: -rw-r--r-- 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extern crate pollster as reexported_pollster;

use std::future::ready;

#[pollster::test]
async fn basic() {
    ready(42).await;
}

#[pollster::test]
async fn result() -> Result<(), std::io::Error> {
    if ready(42).await == 42 {
        Ok(())
    } else {
        unreachable!()
    }
}

#[pollster::test(crate = reexported_pollster)]
async fn crate_path() {
    ready(42).await;
}

#[pollster::test(crate = "reexported_pollster")]
async fn crate_str() {
    ready(42).await;
}