aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-12-16 19:10:36 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-12-16 19:10:36 +0100
commit8e9a91d0b09313eee0f7fa44cc827dced0ea1806 (patch)
treed8948c7dba85dff65b18cf57c661820b9d5220c5 /tests
parent4345c105963cee061acf26bec207fab2859fb164 (diff)
downloadrtic-8e9a91d0b09313eee0f7fa44cc827dced0ea1806.tar.gz
rtic-8e9a91d0b09313eee0f7fa44cc827dced0ea1806.tar.zst
rtic-8e9a91d0b09313eee0f7fa44cc827dced0ea1806.zip
properly handle `#[cfg]` (conditional compilation) on tasks
Diffstat (limited to 'tests')
-rw-r--r--tests/cpass/cfg.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/cpass/cfg.rs b/tests/cpass/cfg.rs
index e2ff9843..c91ab604 100644
--- a/tests/cpass/cfg.rs
+++ b/tests/cpass/cfg.rs
@@ -30,18 +30,22 @@ const APP: () = {
loop {}
}
- #[task(resources = [FOO])]
+ #[task(resources = [FOO], schedule = [quux], spawn = [quux])]
fn foo() {
#[cfg(never)]
static mut BAR: u32 = 0;
}
- #[task(priority = 3, resources = [FOO])]
+ #[task(priority = 3, resources = [FOO], schedule = [quux], spawn = [quux])]
fn bar() {
#[cfg(never)]
static mut BAR: u32 = 0;
}
+ #[cfg(never)]
+ #[task]
+ fn quux() {}
+
extern "C" {
fn UART0();
fn UART1();