From c749979c458472c8e7e719b17a6d6906c7ddf3e0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 23 Feb 2019 21:50:52 +0100 Subject: add some tests --- tests/cpass/binds.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/cpass/binds.rs (limited to 'tests/cpass/binds.rs') diff --git a/tests/cpass/binds.rs b/tests/cpass/binds.rs new file mode 100644 index 0000000..361f08f --- /dev/null +++ b/tests/cpass/binds.rs @@ -0,0 +1,25 @@ +//! Check that `binds` works as advertised +#![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() {} + + #[exception(binds = SVCall)] + fn foo() {} + + #[interrupt(binds = UART0)] + fn bar() {} +}; + +fn foo_trampoline(_: foo::Context) {} + +fn bar_trampoline(_: bar::Context) {} -- cgit v1.2.3 From a23380828071af69ec0362aae1b30c6e09b511f0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 23 Feb 2019 21:56:05 +0100 Subject: fix warnings in cpass test --- tests/cpass/binds.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/cpass/binds.rs') diff --git a/tests/cpass/binds.rs b/tests/cpass/binds.rs index 361f08f..7cb9174 100644 --- a/tests/cpass/binds.rs +++ b/tests/cpass/binds.rs @@ -20,6 +20,8 @@ const APP: () = { fn bar() {} }; +#[allow(dead_code)] fn foo_trampoline(_: foo::Context) {} +#[allow(dead_code)] fn bar_trampoline(_: bar::Context) {} -- cgit v1.2.3