aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor
diff options
context:
space:
mode:
authoreZio Pan <[email protected]>2024-01-02 11:55:09 +0800
committerGitHub <[email protected]>2024-01-02 11:55:09 +0800
commitf5a218a018d3ecd899db0ec5460a4e00dac78abe (patch)
treef4bce8b63044bf2de9277385d229b4dbaf4c53e2 /embassy-executor
parent873ee0615147b4a4e0aacd069ce8ac8df611bbbf (diff)
parent9c2d2ff64d302437e2e0568372c76bf37bbfacf4 (diff)
Merge branch 'embassy-rs:main' into simplepwm-dma
Diffstat (limited to 'embassy-executor')
-rw-r--r--embassy-executor/tests/test.rs14
1 files changed, 14 insertions, 0 deletions
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() {
135 ] 135 ]
136 ) 136 )
137} 137}
138
139#[test]
140fn executor_task_cfg_args() {
141 // simulate cfg'ing away argument c
142 #[task]
143 async fn task1(a: u32, b: u32, #[cfg(any())] c: u32) {
144 let (_, _) = (a, b);
145 }
146
147 #[task]
148 async fn task2(a: u32, b: u32, #[cfg(all())] c: u32) {
149 let (_, _, _) = (a, b, c);
150 }
151}