frondeus / test-case

Rust procedural macro attribute for adding test cases easily
MIT License
614 stars 39 forks source link

Usage with #[tokio::test] #36

Closed mkpankov closed 3 years ago

mkpankov commented 4 years ago

Currently it doesn't seem to work:

    #[tokio::test]
    async fn test_case(name: &str) {

    }

Output:

error: the test function cannot accept arguments
   --> iml-services/iml-devices/src/db.rs:578:24
    |
578 |     async fn test_case(name: &str) {
    |                        ^^^^^^^^^^

Is there a way to provide a test_case::test_case_tokio macro to support async tests?

frondeus commented 4 years ago

That'd be cool... However I'd like to hide it under feature gate.

luke-biel commented 3 years ago

It is fixed now via #48