@@ -17,7 +17,7 @@ using config_b = interrupt::root<
1717 interrupt::irq<17_irq, 42 , interrupt::policies<>, flow_1, flow_2>>;
1818} // namespace
1919
20- TEST_CASE (" init enables interrupts" , " [flow ]" ) {
20+ TEST_CASE (" init enables interrupts" , " [manager ]" ) {
2121 auto m = interrupt::manager<config_a, test_nexus>{};
2222 inited = false ;
2323 enabled<17_irq> = false ;
@@ -30,7 +30,7 @@ TEST_CASE("init enables interrupts", "[flow]") {
3030 CHECK (priority<17_irq> == 42 );
3131}
3232
33- TEST_CASE (" run single flow" , " [flow ]" ) {
33+ TEST_CASE (" run single flow" , " [manager ]" ) {
3434 auto m = interrupt::manager<config_a, test_nexus>{};
3535 flow_run<flow_1> = false ;
3636
@@ -39,7 +39,7 @@ TEST_CASE("run single flow", "[flow]") {
3939 CHECK (flow_run<flow_1>);
4040}
4141
42- TEST_CASE (" run multiple flows" , " [flow ]" ) {
42+ TEST_CASE (" run multiple flows" , " [manager ]" ) {
4343 auto m = interrupt::manager<config_b, test_nexus>{};
4444 flow_run<flow_1> = false ;
4545 flow_run<flow_2> = false ;
@@ -58,7 +58,7 @@ struct alt_nexus {
5858};
5959} // namespace
6060
61- TEST_CASE (" run flow across multiple nexi" , " [flow ]" ) {
61+ TEST_CASE (" run flow across multiple nexi" , " [manager ]" ) {
6262 auto m = interrupt::manager<config_a, test_nexus, alt_nexus>{};
6363 flow_run<flow_1> = false ;
6464 flow_run<alt_flow<flow_1>> = false ;
@@ -93,7 +93,7 @@ using config_shared =
9393 interrupt::irq<38_irq, 39 , interrupt::policies<>, flow_38>>;
9494} // namespace
9595
96- TEST_CASE (" init enables mcu interrupts" , " [flow ]" ) {
96+ TEST_CASE (" init enables mcu interrupts" , " [manager ]" ) {
9797 auto m = interrupt::manager<config_shared, test_nexus>{};
9898 inited = false ;
9999 enabled<33_irq> = false ;
@@ -111,7 +111,7 @@ TEST_CASE("init enables mcu interrupts", "[flow]") {
111111 CHECK (priority<38_irq> == 39 );
112112}
113113
114- TEST_CASE (" init enables dynamic interrupts" , " [flow ]" ) {
114+ TEST_CASE (" init enables dynamic interrupts" , " [manager ]" ) {
115115 auto m = interrupt::manager<config_shared, test_nexus>{};
116116 enable_field_t <33'1 >::value = false ;
117117 enable_field_t <33'2 >::value = false ;
@@ -122,7 +122,7 @@ TEST_CASE("init enables dynamic interrupts", "[flow]") {
122122 CHECK (enable_field_t <33'2 >::value);
123123}
124124
125- TEST_CASE (" run flows if sub_irq is enabled" , " [flow ]" ) {
125+ TEST_CASE (" run flows if sub_irq is enabled" , " [manager ]" ) {
126126 auto m = interrupt::manager<config_shared, test_nexus>{};
127127 enable_field_t <33'1 >::value = true ;
128128 status_field_t <33'1 >::value = true ;
@@ -137,7 +137,7 @@ TEST_CASE("run flows if sub_irq is enabled", "[flow]") {
137137 CHECK (not flow_run<flow_33_2>);
138138}
139139
140- TEST_CASE (" init enables mcu interrupt if any flow is active" , " [flow ]" ) {
140+ TEST_CASE (" init enables mcu interrupt if any flow is active" , " [manager ]" ) {
141141 using config_t = root<interrupt::shared_irq<
142142 33_irq, 34 , interrupt::policies<>,
143143 interrupt::sub_irq<enable_field_t <33'0 >, status_field_t <33'0 >,
@@ -158,7 +158,7 @@ TEST_CASE("init enables mcu interrupt if any flow is active", "[flow]") {
158158}
159159
160160TEST_CASE (" init does not enable mcu interrupt if all flows are inactive" ,
161- " [flow ]" ) {
161+ " [manager ]" ) {
162162 using config_t = root<interrupt::shared_irq<
163163 33_irq, 34 , interrupt::policies<>,
164164 interrupt::sub_irq<enable_field_t <33'0 >, status_field_t <33'0 >,
@@ -191,7 +191,7 @@ using config_shared_sub = root<interrupt::shared_irq<
191191 interrupt::policies<>, flow_33_2_2>>>>;
192192} // namespace
193193
194- TEST_CASE (" run flows for shared sub irqs if enabled" , " [flow ]" ) {
194+ TEST_CASE (" run flows for shared sub irqs if enabled" , " [manager ]" ) {
195195 auto m = interrupt::manager<config_shared_sub, test_nexus>{};
196196 enable_field_t <33'1 >::value = false ;
197197
@@ -213,3 +213,49 @@ TEST_CASE("run flows for shared sub irqs if enabled", "[flow]") {
213213 CHECK (flow_run<flow_33_2_1>);
214214 CHECK (not flow_run<flow_33_2_2>);
215215}
216+
217+ namespace {
218+ using config_shared_no_enable = root<interrupt::shared_irq<
219+ 33_irq, 34 , interrupt::policies<>,
220+ interrupt::sub_irq<interrupt::enable_t <>, status_field_t <33'1 >,
221+ interrupt::policies<>, flow_33_1>>>;
222+ using config_shared_no_status = root<interrupt::shared_irq<
223+ 33_irq, 34 , interrupt::policies<>,
224+ interrupt::sub_irq<enable_field_t <33'1 >, interrupt::status_t <>,
225+ interrupt::policies<>, flow_33_1>>>;
226+ } // namespace
227+
228+ TEST_CASE (" run flows with no enable field" , " [manager]" ) {
229+ auto m = interrupt::manager<config_shared_no_enable, test_nexus>{};
230+ status_field_t <33'1 >::value = true ;
231+ flow_run<flow_33_1> = false ;
232+
233+ m.run <33_irq>();
234+
235+ CHECK (not status_field_t <33'2'1 >::value);
236+ CHECK (flow_run<flow_33_1>);
237+ }
238+
239+ TEST_CASE (" run flows with no status field" , " [manager]" ) {
240+ auto m = interrupt::manager<config_shared_no_status, test_nexus>{};
241+ enable_field_t <33'1 >::value = true ;
242+ flow_run<flow_33_1> = false ;
243+
244+ m.run <33_irq>();
245+
246+ CHECK (flow_run<flow_33_1>);
247+ }
248+
249+ namespace {
250+ using config_shared_id = root<interrupt::shared_irq<
251+ 33_irq, 34 , interrupt::policies<>,
252+ interrupt::id_irq<enable_field_t <33'0 >, interrupt::policies<>>>>;
253+ } // namespace
254+
255+ TEST_CASE (" init enables id interrupts" , " [manager]" ) {
256+ auto m = interrupt::manager<config_shared_id, test_nexus>{};
257+
258+ enable_field_t <33'0 >::value = false ;
259+ m.init ();
260+ CHECK (enable_field_t <33'0 >::value);
261+ }
0 commit comments