aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 17:08:42 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 17:08:42 -0500
commitd396da59502ef67f624bb4d8927ff8697232f66c (patch)
tree264e29e59cf4fe119fb82481b9c6949c579e8399 /tests
parentad2a523cf9d39191d54f4dda3c99f22b5bade7de (diff)
downloadrtic-d396da59502ef67f624bb4d8927ff8697232f66c.tar.gz
rtic-d396da59502ef67f624bb4d8927ff8697232f66c.tar.zst
rtic-d396da59502ef67f624bb4d8927ff8697232f66c.zip
make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate to the procedural macro logic
Diffstat (limited to 'tests')
-rw-r--r--tests/cfail/critical-section.rs1
-rw-r--r--tests/cfail/duplicated-task.rs1
-rw-r--r--tests/cfail/exception.rs4
-rw-r--r--tests/cfail/interrupt.rs10
-rw-r--r--tests/cfail/lock.rs3
-rw-r--r--tests/cfail/token-outlive.rs2
-rw-r--r--tests/cfail/token-transfer.rs1
-rw-r--r--tests/cfail/wrong-threshold.rs2
8 files changed, 6 insertions, 18 deletions
diff --git a/tests/cfail/critical-section.rs b/tests/cfail/critical-section.rs
index 7e73fd33..728388e8 100644
--- a/tests/cfail/critical-section.rs
+++ b/tests/cfail/critical-section.rs
@@ -21,7 +21,6 @@ app! {
tasks: {
EXTI0: {
- enabled: true,
path: exti0,
priority: 1,
resources: [ON],
diff --git a/tests/cfail/duplicated-task.rs b/tests/cfail/duplicated-task.rs
index a167576a..d91f09b6 100644
--- a/tests/cfail/duplicated-task.rs
+++ b/tests/cfail/duplicated-task.rs
@@ -9,7 +9,6 @@ use rtfm::app;
app! {
//~^ error proc macro panicked
- //~| help parsing
device: stm32f103xx,
tasks: {
diff --git a/tests/cfail/exception.rs b/tests/cfail/exception.rs
index 1428bccb..065ccad8 100644
--- a/tests/cfail/exception.rs
+++ b/tests/cfail/exception.rs
@@ -7,9 +7,7 @@ extern crate stm32f103xx;
use rtfm::app;
-app! {
- //~^ error no associated item named `SYS_TICK` found for type
- //~| error no associated item named `SYS_TICK` found for type
+app! { //~ error proc macro panicked
device: stm32f103xx,
tasks: {
diff --git a/tests/cfail/interrupt.rs b/tests/cfail/interrupt.rs
index 2969d1f9..c70528f0 100644
--- a/tests/cfail/interrupt.rs
+++ b/tests/cfail/interrupt.rs
@@ -7,14 +7,14 @@ extern crate stm32f103xx;
use rtfm::app;
-app! { //~ error no associated item named `EXTI0` found for type
+app! {
+ //~^ error no associated item named `EXTI33` found for type
+ //~| error no associated item named `EXTI33` found for type
device: stm32f103xx,
tasks: {
- // ERROR `enabled` needs to be specified for interrupts
- EXTI0: {
- priority: 1,
- },
+ // ERROR this interrupt doesn't exist
+ EXTI33: {},
},
}
diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs
index 8e6da468..e0e37e0f 100644
--- a/tests/cfail/lock.rs
+++ b/tests/cfail/lock.rs
@@ -18,21 +18,18 @@ app! {
tasks: {
EXTI0: {
- enabled: true,
path: exti0,
priority: 1,
resources: [MAX, ON],
},
EXTI1: {
- enabled: true,
path: exti1,
priority: 2,
resources: [ON],
},
EXTI2: {
- enabled: true,
path: exti2,
priority: 16,
resources: [MAX],
diff --git a/tests/cfail/token-outlive.rs b/tests/cfail/token-outlive.rs
index dc9112e6..31231b72 100644
--- a/tests/cfail/token-outlive.rs
+++ b/tests/cfail/token-outlive.rs
@@ -17,14 +17,12 @@ app! {
tasks: {
EXTI0: {
- enabled: true,
path: exti0,
priority: 1,
resources: [STATE],
},
EXTI1: {
- enabled: true,
path: exti1,
priority: 2,
resources: [STATE],
diff --git a/tests/cfail/token-transfer.rs b/tests/cfail/token-transfer.rs
index b8bcc000..d10b82b2 100644
--- a/tests/cfail/token-transfer.rs
+++ b/tests/cfail/token-transfer.rs
@@ -17,7 +17,6 @@ app! { //~ error bound `rtfm::Threshold: core::marker::Send` is not satisfied
tasks: {
EXTI0: {
- enabled: true,
path: exti0,
priority: 1,
resources: [TOKEN],
diff --git a/tests/cfail/wrong-threshold.rs b/tests/cfail/wrong-threshold.rs
index 57d6d305..c9459af7 100644
--- a/tests/cfail/wrong-threshold.rs
+++ b/tests/cfail/wrong-threshold.rs
@@ -18,14 +18,12 @@ app! {
tasks: {
EXTI0: {
- enabled: true,
path: exti0,
priority: 1,
resources: [A, B],
},
EXTI1: {
- enabled: true,
path: exti1,
priority: 2,
resources: [A, B],