From 2efde24f333cdf1730f14c050460eb7e0c44f5b9 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Sun, 31 Dec 2023 16:55:46 +0000 Subject: [PATCH] Add test case --- embassy-executor/tests/test.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/embassy-executor/tests/test.rs b/embassy-executor/tests/test.rs index 0dbd391e8..2c2441dd5 100644 --- a/embassy-executor/tests/test.rs +++ b/embassy-executor/tests/test.rs @@ -135,3 +135,17 @@ fn executor_task_self_wake_twice() { ] ) } + +#[test] +fn executor_task_cfg_args() { + // simulate cfg'ing away argument c + #[task] + async fn task1(a: u32, b: u32, #[cfg(any())] c: u32) { + let (_, _) = (a, b); + } + + #[task] + async fn task2(a: u32, b: u32, #[cfg(all())] c: u32) { + let (_, _, _) = (a, b, c); + } +}