Skip to content

Commit

Permalink
Add test for rpc with cfg attr
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfariello authored and tikue committed Feb 12, 2024
1 parent db276ea commit 67cb619
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/tests/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ fn raw_idents() {
}
}

#[test]
fn service_with_cfg_rpc() {
#[tarpc::service]
trait Foo {
async fn foo();
#[cfg(not(test))]
async fn bar(s: String) -> String;
}

impl Foo for () {
async fn foo(self, _: context::Context) {}
}
}

#[test]
fn syntax() {
#[tarpc::service]
Expand Down

0 comments on commit 67cb619

Please sign in to comment.