File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,12 @@ struct shared_sub_irq_impl : Config {
86
86
using Config::status_field;
87
87
88
88
[[nodiscard]] static auto get_interrupt_enables () {
89
- return stdx::tuple_cat (Subs::get_interrupt_enables ()...);
89
+ if constexpr (active) {
90
+ return stdx::tuple_cat (stdx::make_tuple (enable_field),
91
+ Subs::get_interrupt_enables ()...);
92
+ } else {
93
+ return stdx::tuple{};
94
+ }
90
95
}
91
96
92
97
static auto run () -> void {
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ TEST_CASE(
98
98
using impl_t =
99
99
interrupt::shared_sub_irq_impl<flow_config_t <std::true_type>,
100
100
active_sub_impl_t , inactive_sub_impl_t >;
101
- CHECK (impl_t::get_interrupt_enables () ==
102
- stdx::tuple{enable_field_t <17 >{}, enable_field_t <0 >{}});
101
+
102
+ auto expected = stdx::tuple{enable_field_t <0 >{}, enable_field_t <17 >{}};
103
+ auto actual = impl_t::get_interrupt_enables ();
104
+
105
+ CHECK (std::size (expected) == std::size (actual));
106
+ CHECK (expected == actual);
103
107
}
You can’t perform that action at this time.
0 commit comments