From 1f1cf84ab41ec26ac58c31260667f97507def0d0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 18 Jul 2017 15:14:39 -0500 Subject: add cfail tests --- tests/cfail/priority-too-low.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/cfail/priority-too-low.rs (limited to 'tests/cfail/priority-too-low.rs') diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs new file mode 100644 index 0000000..8bb0801 --- /dev/null +++ b/tests/cfail/priority-too-low.rs @@ -0,0 +1,29 @@ +#![deny(warnings)] +#![feature(proc_macro)] + +#[macro_use(task)] +extern crate cortex_m_rtfm as rtfm; +extern crate stm32f103xx; + +use rtfm::{app, Threshold}; + +app! { //~ error attempt to subtract with overflow + device: stm32f103xx, + + tasks: { + SYS_TICK: { + // ERROR priority must be in the range [1, 16] + priority: 0, + }, + }, +} + +fn init(_p: init::Peripherals) {} + +fn idle() -> ! { + loop {} +} + +task!(SYS_TICK, sys_tick); + +fn sys_tick(_: Threshold, _: SYS_TICK::Resources) {} -- cgit v1.2.3