diff options
| author | Per Lindgren <per.lindgren@ltu.se> | 2020-10-23 10:35:56 +0200 |
|---|---|---|
| committer | Per Lindgren <per.lindgren@ltu.se> | 2020-10-23 23:58:09 +0200 |
| commit | 1c244a995d54332649c1643aa0a3178f169406e4 (patch) | |
| tree | ef7676e7439ccf9407fcde998a654d9700f20524 /macros/src/tests | |
| parent | 86699039e99229049ee3c739eaf860acc70a1bf7 (diff) | |
move dispatchers to app argument
Diffstat (limited to 'macros/src/tests')
| -rw-r--r-- | macros/src/tests/single.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/macros/src/tests/single.rs b/macros/src/tests/single.rs index 97cbbb3..8c026e9 100644 --- a/macros/src/tests/single.rs +++ b/macros/src/tests/single.rs @@ -6,7 +6,8 @@ fn analyze() { let mut settings = Settings::default(); settings.parse_extern_interrupt = true; let (app, analysis) = rtic_syntax::parse2( - quote!(device = pac), + // First interrupt is assigned to the highest priority dispatcher + quote!(device = pac, dispatchers = [B, A]), quote!( mod app { #[task(priority = 1)] @@ -14,12 +15,6 @@ fn analyze() { #[task(priority = 2)] fn b(_: b::Context) {} - - // First interrupt is assigned to the highest priority dispatcher - extern "C" { - fn B(); - fn A(); - } } ), settings, @@ -29,6 +24,6 @@ fn analyze() { let analysis = crate::analyze::app(analysis, &app); let interrupts = &analysis.interrupts; assert_eq!(interrupts.len(), 2); - assert_eq!(interrupts[&2].to_string(), "B"); - assert_eq!(interrupts[&1].to_string(), "A"); + assert_eq!(interrupts[&2].0.to_string(), "B"); + assert_eq!(interrupts[&1].0.to_string(), "A"); } |
