fix tests

This commit is contained in:
Jorge Aparicio 2018-05-17 23:28:58 +02:00
parent dbb4ca6c33
commit e9b8cd2486
15 changed files with 18 additions and 51 deletions

View file

@ -20,7 +20,10 @@ required-features = ["timer-queue"]
name = "schedule-now"
[[example]]
name = "empty"
name = "minimal"
[[example]]
name = "idle"
[[example]]
name = "event-task"
@ -56,9 +59,14 @@ required-features = ["timer-queue"]
[dependencies]
cortex-m = "0.5.0"
cortex-m-rtfm-macros = { path = "macros", version = "0.3.1" }
heapless = "0.3.6"
# heapless = "0.3.6"
heapless = { git = "https://github.com/japaric//heapless", branch = "object-pool" }
typenum = "1.10.0"
[dependencies.stable_deref_trait]
default-features = false
version = "1"
[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
compiletest_rs = "0.3.5"

View file

@ -10,7 +10,8 @@ main() {
# examples that don't require the timer-queue feature
local examples=(
schedule-now
empty
minimal
idle
event-task
)

View file

@ -13,8 +13,8 @@ version = "0.3.1"
failure = "0.1.1"
proc-macro2 = "0.3.6"
quote = "0.5.1"
# rtfm-syntax = "0.3.0"
rtfm-syntax = { path = "../../rtfm-syntax" }
# rtfm-syntax = "0.4.0"
rtfm-syntax = { git = "https://github.com/japaric/rtfm-syntax", branch = "tq" }
syn = "0.13.1"
[dependencies.either]

View file

@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn sys_tick(_ctxt: sys_tick::Context) {}

View file

@ -1,3 +1,4 @@
// error-pattern: mismatched types
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(proc_macro)]
@ -10,8 +11,10 @@ extern crate stm32f103xx;
use rtfm::app;
app! { //~ mismatched types
app! {
device: stm32f103xx,
idle: {},
}
fn init(_ctxt: init::Context) -> init::LateResources {

View file

@ -34,8 +34,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti0(_ctxt: exti0::Context) {}

View file

@ -12,13 +12,8 @@ use rtfm::app;
app! { //~ error mismatched types
//~^ incorrect number of function parameters
//~| note expected type `fn(init::Context) -> _ZN4init13LateResourcesE`
device: stm32f103xx,
}
// ERROR `init` must have signature `fn (init::Peripherals)`
fn init() {}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}

View file

@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti33(_ctxt: exti33::Context) {}

View file

@ -41,10 +41,6 @@ fn init(ctxt: init::Context) -> init::LateResources {
init::LateResources { LATE: 0 }
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti0(_ctxt: exti0::Context) {}
fn exti1(_ctxt: exti1::Context) {}

View file

@ -45,10 +45,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
#[allow(non_snake_case)]
fn exti0(mut ctxt: exti0::Context) {
let exti0::Resources { ON, mut MAX } = ctxt.resources;

View file

@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti0(_ctxt: exti0::Context) {}

View file

@ -30,7 +30,3 @@ app! { //~ error proc macro panicked
}
fn init(_ctxt: init::Context) -> init::LateResources {}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}

View file

@ -36,10 +36,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn is_send<T>(_: &T)
where
T: Send,

View file

@ -36,10 +36,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti0(ctxt: exti0::Context) {
// ERROR token should not outlive the critical section
let op = &mut ctxt.priority;

View file

@ -37,10 +37,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
init::LateResources {}
}
fn idle(_ctxt: idle::Context) -> ! {
loop {}
}
fn exti0(mut ctxt: exti0::Context) {
let op = &mut ctxt.priority;
let exti0::Resources { A, B } = ctxt.resources;