diff options
Diffstat (limited to 'tests/cfail')
39 files changed, 0 insertions, 873 deletions
diff --git a/tests/cfail/cfg-resources.rs b/tests/cfail/cfg-resources.rs deleted file mode 100644 index 5e20c4de..00000000 --- a/tests/cfail/cfg-resources.rs +++ /dev/null @@ -1,64 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[cfg(never)] - static mut O1: u32 = 0; // init - #[cfg(never)] - static mut O2: u32 = 0; // idle - #[cfg(never)] - static mut O3: u32 = 0; // EXTI0 - #[cfg(never)] - static O4: u32 = 0; // idle - #[cfg(never)] - static O5: u32 = 0; // EXTI1 - #[cfg(never)] - static O6: u32 = 0; // init - - #[cfg(never)] - static mut S1: u32 = 0; // idle & EXTI0 - #[cfg(never)] - static mut S2: u32 = 0; // EXTI0 & EXTI1 - #[cfg(never)] - static S3: u32 = 0; - - #[init(resources = [O1, O4, O5, O6, S3])] - fn init(c: init::Context) { - c.resources.O1; //~ ERROR no field `O1` - c.resources.O4; //~ ERROR no field `O4` - c.resources.O5; //~ ERROR no field `O5` - c.resources.O6; //~ ERROR no field `O6` - c.resources.S3; //~ ERROR no field `S3` - } - - #[idle(resources = [O2, O4, S1, S3])] - fn idle(c: idle::Context) -> ! { - c.resources.O2; //~ ERROR no field `O2` - c.resources.O4; //~ ERROR no field `O4` - c.resources.S1; //~ ERROR no field `S1` - c.resources.S3; //~ ERROR no field `S3` - - loop {} - } - - #[interrupt(resources = [O3, S1, S2, S3])] - fn UART0(c: UART0::Context) { - c.resources.O3; //~ ERROR no field `O3` - c.resources.S1; //~ ERROR no field `S1` - c.resources.S2; //~ ERROR no field `S2` - c.resources.S3; //~ ERROR no field `S3` - } - - #[interrupt(resources = [S2, O5])] - fn UART1(c: UART1::Context) { - c.resources.S2; //~ ERROR no field `S2` - c.resources.O5; //~ ERROR no field `O5` - } -}; diff --git a/tests/cfail/cfg-static.rs b/tests/cfail/cfg-static.rs deleted file mode 100644 index 91465a1e..00000000 --- a/tests/cfail/cfg-static.rs +++ /dev/null @@ -1,57 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[idle] - fn idle(_: idle::Context) -> ! { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - - loop {} - } - - #[exception] - fn SVCall(_: SVCall::Context) { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[interrupt] - fn UART0(_: UART0::Context) { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[task] - fn foo(_: foo::Context) { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - extern "C" { - fn UART1(); - } -}; diff --git a/tests/cfail/duplicate-args-2.rs b/tests/cfail/duplicate-args-2.rs deleted file mode 100644 index 5bef79b5..00000000 --- a/tests/cfail/duplicate-args-2.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task( - priority = 1, - priority = 2, //~ ERROR argument appears more than once - )] - fn foo(_: foo::Context) {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/duplicate-args.rs b/tests/cfail/duplicate-args.rs deleted file mode 100644 index 6938cd0d..00000000 --- a/tests/cfail/duplicate-args.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task( - capacity = 1, - capacity = 2, //~ ERROR argument appears more than once - )] - fn foo(_: foo::Context) {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/exception-divergent.rs b/tests/cfail/exception-divergent.rs deleted file mode 100644 index 3fe9a365..00000000 --- a/tests/cfail/exception-divergent.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception] - fn SVCall(_: SVCall::Context) -> ! { - //~^ ERROR this `exception` handler must have type signature `fn(SVCall::Context)` - loop {} - } -}; diff --git a/tests/cfail/exception-input.rs b/tests/cfail/exception-input.rs deleted file mode 100644 index d1363fe5..00000000 --- a/tests/cfail/exception-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception] - fn SVCall(_: SVCall::Context, undef: u32) { - //~^ ERROR this `exception` handler must have type signature `fn(SVCall::Context)` - } -}; diff --git a/tests/cfail/exception-invalid.rs b/tests/cfail/exception-invalid.rs deleted file mode 100644 index 4bb8f1ec..00000000 --- a/tests/cfail/exception-invalid.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception] - fn NonMaskableInt(_: NonMaskableInt::Context) { - //~^ ERROR only exceptions with configurable priority can be used as hardware tasks - } -}; diff --git a/tests/cfail/exception-output.rs b/tests/cfail/exception-output.rs deleted file mode 100644 index 8f672985..00000000 --- a/tests/cfail/exception-output.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception] - fn SVCall(_: SVCall::Context) -> u32 { - //~^ ERROR this `exception` handler must have type signature `fn(SVCall::Context)` - 0 - } -}; diff --git a/tests/cfail/exception-sys-tick.rs b/tests/cfail/exception-sys-tick.rs deleted file mode 100644 index d5eae20b..00000000 --- a/tests/cfail/exception-sys-tick.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception] - fn SysTick(_: SysTick::Context) { - //~^ ERROR the `SysTick` exception can't be used because it's used by the runtime - } -}; diff --git a/tests/cfail/idle-input.rs b/tests/cfail/idle-input.rs deleted file mode 100644 index feb83e8b..00000000 --- a/tests/cfail/idle-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[idle] - fn idle(_: idle::Context, undef: u32) { - //~^ ERROR `idle` must have type signature `fn(idle::Context) -> !` - } -}; diff --git a/tests/cfail/idle-not-divergent.rs b/tests/cfail/idle-not-divergent.rs deleted file mode 100644 index 505fba14..00000000 --- a/tests/cfail/idle-not-divergent.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[idle] - fn idle(_: idle::Context) { - //~^ ERROR `idle` must have type signature `fn(idle::Context) -> !` - } -}; diff --git a/tests/cfail/init-divergent.rs b/tests/cfail/init-divergent.rs deleted file mode 100644 index 0e779ffc..00000000 --- a/tests/cfail/init-divergent.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) -> ! { - //~^ ERROR `init` must have type signature `fn(init::Context) [-> init::LateResources]` - loop {} - } -}; diff --git a/tests/cfail/init-extra-late-resources.rs b/tests/cfail/init-extra-late-resources.rs deleted file mode 100644 index d2d4a6d7..00000000 --- a/tests/cfail/init-extra-late-resources.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) -> init::LateResources {} - //~^ error: `init` signature must be `fn(init::Context)` if there are no late resources -}; diff --git a/tests/cfail/init-input.rs b/tests/cfail/init-input.rs deleted file mode 100644 index 9063efe3..00000000 --- a/tests/cfail/init-input.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context, undef: u32) { - //~^ ERROR `init` must have type signature `fn(init::Context) [-> init::LateResources]` - } -}; diff --git a/tests/cfail/init-missing-late-resources.rs b/tests/cfail/init-missing-late-resources.rs deleted file mode 100644 index cec18bab..00000000 --- a/tests/cfail/init-missing-late-resources.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - static mut X: i32 = (); - - #[init] - fn init(_: init::Context) {} - //~^ error: late resources have been specified so `init` must return `init::LateResources` -}; diff --git a/tests/cfail/init-not-send.rs b/tests/cfail/init-not-send.rs deleted file mode 100644 index 5a33fac7..00000000 --- a/tests/cfail/init-not-send.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! This is equivalent to the `late-not-send` cfail test - -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSend { - _0: PhantomData<*const ()>, -} - -#[app(device = lm3s6965)] //~ ERROR `*const ()` cannot be sent between threads safely -const APP: () = { - static mut X: Option<NotSend> = None; - - #[init(resources = [X])] - fn init(c: init::Context) { - *c.resources.X = Some(NotSend { _0: PhantomData }) - } - - #[interrupt(resources = [X])] - fn UART0(_: UART0::Context) {} -}; diff --git a/tests/cfail/init-output.rs b/tests/cfail/init-output.rs deleted file mode 100644 index f88d5340..00000000 --- a/tests/cfail/init-output.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) -> u32 { - //~^ ERROR `init` must have type signature `fn(init::Context) [-> init::LateResources]` - 0 - } -}; diff --git a/tests/cfail/insufficient-free-interrupts.rs b/tests/cfail/insufficient-free-interrupts.rs deleted file mode 100644 index 7148fbf3..00000000 --- a/tests/cfail/insufficient-free-interrupts.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] //~ ERROR 1 free interrupt (`extern { .. }`) is required -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task] - fn foo(_: foo::Context) {} -}; diff --git a/tests/cfail/interrupt-divergent.rs b/tests/cfail/interrupt-divergent.rs deleted file mode 100644 index b67601ee..00000000 --- a/tests/cfail/interrupt-divergent.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt] - fn UART0(_: UART0::Context) -> ! { - //~^ ERROR this `interrupt` handler must have type signature `fn(UART0::Context)` - loop {} - } -}; diff --git a/tests/cfail/interrupt-input.rs b/tests/cfail/interrupt-input.rs deleted file mode 100644 index f11b2d39..00000000 --- a/tests/cfail/interrupt-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt] - fn UART0(_: UART0::Context, undef: u32) { - //~^ ERROR this `interrupt` handler must have type signature `fn(UART0::Context)` - } -}; diff --git a/tests/cfail/interrupt-output.rs b/tests/cfail/interrupt-output.rs deleted file mode 100644 index 69e4957f..00000000 --- a/tests/cfail/interrupt-output.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt] - fn UART0(_: UART0::Context) -> u32 { - //~^ ERROR this `interrupt` handler must have type signature `fn(UART0::Context)` - 0 - } -}; diff --git a/tests/cfail/late-assigned-to-init.rs b/tests/cfail/late-assigned-to-init.rs deleted file mode 100644 index 00d6c8ce..00000000 --- a/tests/cfail/late-assigned-to-init.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - static mut X: u32 = (); - - #[init(resources = [X])] //~ ERROR late resources can NOT be assigned to `init` - fn init(_: init::Context) {} -}; diff --git a/tests/cfail/late-not-send.rs b/tests/cfail/late-not-send.rs deleted file mode 100644 index 04a4af15..00000000 --- a/tests/cfail/late-not-send.rs +++ /dev/null @@ -1,32 +0,0 @@ -//! `init` has a static priority of `0`. Initializing resources from it is equivalent to sending a -//! message to the task that will own the resource - -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -struct NotSend { - _0: PhantomData<*const ()>, -} - -#[app(device = lm3s6965)] //~ ERROR `*const ()` cannot be sent between threads safely -const APP: () = { - static mut X: NotSend = (); - - #[init] - fn init(_: init::Context) -> init::LateResources { - init::LateResources { - X: NotSend { _0: PhantomData }, - } - } - - #[interrupt(resources = [X])] - fn UART0(_: UART0::Context) {} -}; diff --git a/tests/cfail/needs-send.rs b/tests/cfail/needs-send.rs deleted file mode 100644 index 8dc9707f..00000000 --- a/tests/cfail/needs-send.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSend { - _0: PhantomData<*const ()>, -} - -unsafe impl Sync for NotSend {} - -#[app(device = lm3s6965)] //~ ERROR cannot be sent between threads safely -const APP: () = { - #[init(spawn = [foo])] - fn init(_: init::Context) {} - - #[task] - fn foo(_: foo::Context, _x: NotSend) {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/needs-sync.rs b/tests/cfail/needs-sync.rs deleted file mode 100644 index 6025e7d5..00000000 --- a/tests/cfail/needs-sync.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSync { - _0: PhantomData<*const ()>, -} - -unsafe impl Send for NotSync {} - -#[app(device = lm3s6965)] //~ ERROR cannot be shared between threads safely -const APP: () = { - static X: NotSync = NotSync { _0: PhantomData }; - - #[init(spawn = [foo])] - fn init(_: init::Context) {} - - #[task(priority = 1, resources = [X])] - fn foo(_: foo::Context) {} - - #[task(priority = 2, resources = [X])] - fn bar(_: bar::Context) {} - - extern "C" { - fn UART0(); - fn UART1(); - } -}; diff --git a/tests/cfail/priority-too-high.rs b/tests/cfail/priority-too-high.rs deleted file mode 100644 index 817462a3..00000000 --- a/tests/cfail/priority-too-high.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] //~ error evaluation of constant value failed -const APP: () = { - #[init] - fn init(_: init::Context) {} - - // OK, this is the maximum priority supported by the device - #[interrupt(priority = 8)] - fn UART0(_: UART0::Context) {} - - // this value is too high! - #[interrupt(priority = 9)] - fn UART1(_: UART1::Context) {} -}; diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs deleted file mode 100644 index 361156df..00000000 --- a/tests/cfail/priority-too-low.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - // OK, this is the minimum priority that tasks can have - #[interrupt(priority = 1)] - fn UART0(_: UART0::Context) {} - - // this value is too low! - #[interrupt(priority = 0)] //~ error this literal must be in the range 1...255 - fn UART1(_: UART1::Context) {} -}; diff --git a/tests/cfail/resource-not-declared.rs b/tests/cfail/resource-not-declared.rs deleted file mode 100644 index a37be42d..00000000 --- a/tests/cfail/resource-not-declared.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init(resources = [X])] //~ ERROR this resource has NOT been declared - fn init(_: init::Context) {} -}; diff --git a/tests/cfail/resource-pub.rs b/tests/cfail/resource-pub.rs deleted file mode 100644 index 3fb21f46..00000000 --- a/tests/cfail/resource-pub.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - pub static mut X: u32 = 0; - //~^ ERROR resources must have inherited / private visibility - - #[init] - fn init(_: init::Context) {} -}; diff --git a/tests/cfail/task-divergent.rs b/tests/cfail/task-divergent.rs deleted file mode 100644 index 577f0e06..00000000 --- a/tests/cfail/task-divergent.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -#[rtfm::app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task] - fn foo(_: foo::Context) -> ! { - //~^ ERROR this `task` handler must have type signature `fn(foo::Context, ..)` - loop {} - } - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/task-idle.rs b/tests/cfail/task-idle.rs deleted file mode 100644 index 963bf1ee..00000000 --- a/tests/cfail/task-idle.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task] - fn idle(_: idle::Context) { - //~^ ERROR `task` handlers can NOT be named `idle`, `init` or `resources` - } - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/task-not-declared.rs b/tests/cfail/task-not-declared.rs deleted file mode 100644 index 04309f59..00000000 --- a/tests/cfail/task-not-declared.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init(spawn = [X])] //~ ERROR this task has NOT been declared - fn init(_: init::Context) {} -}; diff --git a/tests/cfail/unsafe-exception.rs b/tests/cfail/unsafe-exception.rs deleted file mode 100644 index 353194a5..00000000 --- a/tests/cfail/unsafe-exception.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[exception(binds = SVCall)] - unsafe fn foo(_: foo::Context) {} - //~^ ERROR this `exception` handler must have type signature `fn(foo::Context)` -}; diff --git a/tests/cfail/unsafe-idle.rs b/tests/cfail/unsafe-idle.rs deleted file mode 100644 index fab1b0f1..00000000 --- a/tests/cfail/unsafe-idle.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[idle] - unsafe fn idle(_: idle::Context) -> ! { - //~^ ERROR `idle` must have type signature `fn(idle::Context) -> !` - loop {} - } -}; diff --git a/tests/cfail/unsafe-init.rs b/tests/cfail/unsafe-init.rs deleted file mode 100644 index d8bb5605..00000000 --- a/tests/cfail/unsafe-init.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - unsafe fn init(_: init::Context) {} - //~^ ERROR `init` must have type signature `fn(init::Context) [-> init::LateResources]` -}; diff --git a/tests/cfail/unsafe-interrupt.rs b/tests/cfail/unsafe-interrupt.rs deleted file mode 100644 index 93225edf..00000000 --- a/tests/cfail/unsafe-interrupt.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt(binds = UART0)] - unsafe fn foo(_: foo::Context) {} - //~^ ERROR this `interrupt` handler must have type signature `fn(foo::Context)` -}; diff --git a/tests/cfail/unsafe-task.rs b/tests/cfail/unsafe-task.rs deleted file mode 100644 index 58c4d70c..00000000 --- a/tests/cfail/unsafe-task.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[task] - unsafe fn foo(_: foo::Context) {} - //~^ ERROR this `task` handler must have type signature `fn(foo::Context, ..)` - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/used-free-interrupt-2.rs b/tests/cfail/used-free-interrupt-2.rs deleted file mode 100644 index ba9424fd..00000000 --- a/tests/cfail/used-free-interrupt-2.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt(binds = UART0)] //~ ERROR free interrupts (`extern { .. }`) can't be used as interrupt handlers - fn foo(_: foo::Context) {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/used-free-interrupt.rs b/tests/cfail/used-free-interrupt.rs deleted file mode 100644 index 1a56741b..00000000 --- a/tests/cfail/used-free-interrupt.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(_: init::Context) {} - - #[interrupt] - fn UART0(_: UART0::Context) {} - //~^ ERROR free interrupts (`extern { .. }`) can't be used as interrupt handlers - - extern "C" { - fn UART0(); - } -}; |