Files
ludi/ludi-macros-test/tests/interface_basic.rs
2024-01-08 19:03:36 -08:00

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>();
}