mirror of
https://github.com/sinui0/ludi.git
synced 2026-01-09 12:58:04 -05:00
22 lines
511 B
Rust
22 lines
511 B
Rust
#![allow(dead_code, unreachable_code)]
|
|
|
|
use ludi_macros_test::*;
|
|
|
|
#[ludi::interface(msg(wrap))]
|
|
pub trait Foo {
|
|
#[msg(name = "FooMethod")]
|
|
fn foo(&self, msg: String) -> impl std::future::Future<Output = String>;
|
|
|
|
#[allow(async_fn_in_trait)]
|
|
async fn bar(&self);
|
|
}
|
|
|
|
#[test]
|
|
fn test() {
|
|
assert_message::<FooMsg, FooMsgReturn>();
|
|
assert_message::<FooMethod, String>();
|
|
assert_message::<FooMsgBar, ()>();
|
|
assert_wrap::<FooMsg, FooMethod>();
|
|
assert_wrap::<FooMsg, FooMsgBar>();
|
|
}
|