aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/tests
diff options
context:
space:
mode:
authorScott Mabin <[email protected]>2023-12-31 16:55:46 +0000
committerScott Mabin <[email protected]>2023-12-31 16:55:46 +0000
commit2efde24f333cdf1730f14c050460eb7e0c44f5b9 (patch)
treee308dcfc94b12cba17487c4a4f4e7449e8935c41 /embassy-executor/tests
parent93b64b90ce426e6d1aa91d473265ec5dfde97b71 (diff)
Add test case
Diffstat (limited to 'embassy-executor/tests')
-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}