glib

Attribute Macro async_test

Source
#[async_test]
Expand description

An attribute macro for writing asynchronous test functions.

This macro is designed to wrap an asynchronous test function and ensure that it runs within a glib::MainContext. It helps in writing async tests that require the use of an event loop for the asynchronous execution.

§Example

#[glib::async_test]
async fn my_async_test() {
    // Test code that runs asynchronously
}